11 #ifndef __GT_PrimInstance__
12 #define __GT_PrimInstance__
46 int nsegs)
const override
47 { doEnlargeBounds(boxes, nsegs,
false); }
49 int nsegs)
const override
50 { doEnlargeBounds(boxes, nsegs,
true); }
63 int seg=0)
const override;
75 {
return myGeometry && myTransforms; }
79 {
return myTransforms ? myTransforms->entries():0; }
83 {
return myGeometry; }
87 {
return myTransforms; }
90 {
return myTransforms; }
99 {
return myPackedPrimOffsets; }
110 bool refineToInstances(
GT_Refine &refiner,
114 bool flattenInstances(
GT_Refine &refiner,
141 virtual bool isSimplePrimitive(
int primitive_type)
const;
148 {
return mySourceGeometry; }
150 { mySourceGeometry =
g; }
162 , myPrimPacked(false)
181 bool forrender)
const;
virtual int getMotionSegments() const =0
virtual bool updateGeoPrim(const GU_ConstDetailHandle &dtl, const GT_RefineParms &parms)
update any cached data for geometry and its attributes
virtual bool refine(GT_Refine &refiner, const GT_RefineParms *parms=NULL) const
virtual const GT_ViewportRefineOptions & viewportRefineOptions() const
GT_TransformArrayHandle myTransforms
bool isValid() const
Check valid.
virtual int getPrimitiveType() const
virtual fpreal computePerimeter(int seg=0) const
UT_IntrusivePtr< GT_AttributeList > GT_AttributeListHandle
virtual fpreal computeVolume(const UT_Vector3 &ref_P, int seg=0) const
void enlargeRenderBounds(UT_BoundingBox boxes[], int nsegs) const override
void setSourceGeometry(const GT_GEODetailListHandle &g)
Class which writes ASCII or binary JSON streams.
const GT_TransformArrayHandle & transforms() const
Return transforms for instances.
const GT_GEOOffsetList & packedPrimOffsets() const
UT_Array< ExtractTransformEntry > ExtractTransformCache
#define GA_INVALID_OFFSET
const GT_AttributeListHandle & getUniformAttributes() const override
GT_GEOOffsetList myPackedPrimOffsets
GT_AttributeListHandle myDetail
virtual GT_PrimitiveHandle doSoftCopy() const =0
GT_PrimitiveHandle myGeometry
virtual fpreal computeSurfaceArea(int seg=0) const
const GT_AttributeListHandle & uniform() const
Return uniform attributes.
virtual void getVelocityRange(UT_Vector3 &min, UT_Vector3 &max, const UT_StringRef &attribute_name=GA_Names::v) const
GLsizei GLsizei GLchar * source
The base class for all GT primitive types.
virtual GT_PrimitiveHandle doHarden() const
virtual int64 getMemoryUsage() const =0
GT_AttributeListHandle myUniform
Processes primitives generated by refinement process.
const GT_PrimitiveHandle & geometry() const
Return geometry to be instanced.
void enlargeBounds(UT_BoundingBox boxes[], int nsegs) const override
GT_TransformArrayHandle & transforms()
Non-const transform access (for appending new transforms).
const GT_AttributeListHandle & detail() const
Return detail attributes.
virtual bool save(UT_JSONWriter &w) const
const GT_GEODetailListHandle & sourceGeometry() const
GLubyte GLubyte GLubyte GLubyte w
GT_Size entries() const
Return number of instances.
UT_SharedPtr< GT_GEODetailList > GT_GEODetailListHandle
virtual const char * className() const =0
GT_GEODetailListHandle mySourceGeometry
const GT_AttributeListHandle & getDetailAttributes() const override