11 #ifndef __GU_PackedFragment__
12 #define __GU_PackedFragment__
99 {
return loadFrom(prim, options, map); }
105 {
return loadFrom(prim, options, map); }
108 { updateFrom(prim, options); }
131 UT_ASSERT(
false &&
"Should not be called!");
145 bool inclusive)
const override;
160 if (myIsIntegerAttrib)
163 buf.
itoa(myAttribIntValue);
167 return myAttribValue;
175 myIsIntegerAttrib =
false;
180 myIsIntegerAttrib =
true;
181 myAttribIntValue =
f;
185 loadPackedGeometry();
197 loadPackedGeometry();
206 void makeEmbeddedname();
208 template <
typename T>
211 template <
typename T>
214 virtual bool loadPackedGeometry()
const;
virtual void getVelocityRange(UT_Vector3 &min, UT_Vector3 &max) const =0
UT_StringHolder intrinsicName(const GU_PrimPacked *prim) const
Definition of a geometry attribute.
GLenum GLuint GLenum GLsizei const GLchar * buf
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
const GU_ConstDetailHandle & detailPtr() const
Used to pass options and map offset values during saving.
bool loadFromJSON(GU_PrimPacked *prim, const UT_JSONValueMap &options, const GA_LoadMap &map) override
void setAttribute(GU_PrimPacked *prim, const UT_StringHolder &f)
UT_StringHolder attribute() const
SYS_FORCE_INLINE const char * buffer() const
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
virtual bool getBounds(UT_BoundingBox &box) const =0
Get the bounding box for the geometry (not including transforms)
Class which writes ASCII or binary JSON streams.
UT_SharedPtr< GA_SharedDataHandle > GA_SharedDataHandlePtr
#define GA_INVALID_OFFSET
A range of elements in an index-map.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
virtual bool getRenderingBounds(UT_BoundingBox &box) const =0
virtual bool isLoaded() const
UT_UniquePtr< fpreal64[]> myBoundingBox
virtual void forceLoad() const
bool supportsJSONLoad() const override
virtual void clearData()=0
UT_StringHolder name() const
static GA_PrimitiveTypeId theTypeId
virtual int64 getMemoryUsage(bool inclusive) const =0
Report memory usage (includes all shared memory)
virtual void countMemory(UT_MemoryCounter &counter, bool inclusive) const =0
virtual GU_PackedFactory * getFactory() const =0
Get the factory associated with this procedural.
virtual GU_ConstDetailHandle getPackedDetail(GU_PackedContext *context=0) const
bool load(GU_PrimPacked *prim, const UT_Options &options, const GA_LoadMap &map) override
UT_StringHolder myAttribValue
GU_ConstDetailHandle myDetail
GLuint const GLchar * name
const GA_Attribute * myCachedAttrib
GA_API const UT_StringHolder transform
bool saveCachedBBox() const override
exint getUniqueId() const
virtual bool isValid() const =0
Test whether the deferred load primitive data is valid.
void update(GU_PrimPacked *prim, const UT_Options &options) override
bool loadSharedData(int dtype, const GA_SharedLoadData *it) override
A map of string to various well defined value types.
virtual GU_PackedImpl * copy() const =0
Create a copy of this resolver.
bool unpack(GU_Detail &destgdp, const GU_PrimPacked *prim) const
UT_StringHolder intrinsicAttribute(const GU_PrimPacked *prim) const
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
UT_StringHolder myAttribName
OIIO_API bool attribute(string_view name, TypeDesc type, const void *val)
virtual bool saveSharedData(UT_JSONWriter &w, GA_SaveMap &map, GA_GeometryIndex *geo_index) const
GA_AttributeOwner myAttribOwner
GLubyte GLubyte GLubyte GLubyte w
Geometry fragment procedural.
virtual bool save(UT_Options &options, const GA_SaveMap &map) const =0
Copy the resolver data into the UT_Options for saving.
void setName(GU_PrimPacked *prim, const UT_StringHolder &f)
GA_SharedDataHandlePtr mySharedData
exint intrinsicGeometryId(const GU_PrimPacked *prim) const
const GU_Detail * getGdp() const
static GA_PrimitiveTypeId typeId()
Get the type ID for the GU_PackedFragment primitive type.
void setName(GU_PrimPacked *prim, exint f)
virtual void getWidthRange(fpreal &wmin, fpreal &wmax) const =0