11 #ifndef __GU_PackedImpl__
12 #define __GU_PackedImpl__
252 virtual bool isValid()
const = 0;
257 virtual void clearData() = 0;
278 {
UT_ASSERT(!
"JSON direct loading not supported");
return false; }
296 virtual bool loadSharedData(
int load_data_type,
306 virtual bool loadUnknownToken(
const char *token,
UT_JSONParser &p,
321 {
return getBounds(box); }
342 virtual void getWidthRange(
fpreal &wmin,
fpreal &wmax)
const = 0;
356 const char *intrinsicFactoryName(
const GU_PrimPacked *prim)
const;
357 const char *intrinsicFactoryLabel(
const GU_PrimPacked *prim)
const;
366 const char *intrinsicViewportLOD(
const GU_PrimPacked *prim)
const;
374 virtual bool getLocalTransform(
UT_Matrix4D &m)
const;
382 {
return unpack(destgdp, prim); }
403 return unpack(destgdp, transform);
411 virtual bool unpackWithStyler(
428 virtual bool unpackUsingPolygons(
448 {
return myPointInstanceTransform; }
450 {
return pointInstanceTransform(); }
457 static bool computeVelocityRange(
const GU_Detail *gdp,
459 static bool computeWidthRange(
const GU_Detail *gdp,
463 virtual int64 getMemoryUsage(
bool inclusive)
const = 0;
469 virtual void countMemory(
UT_MemoryCounter &counter,
bool inclusive)
const = 0;
482 UT_ASSERT_MSG(0,
"Subclass should implement setFacesetAttribute, when applicable.");
494 UT_ASSERT_MSG(0,
"Subclass should implement setAttributeNameMap, when applicable.");
501 return theNullPackedNameMapPtr;
508 UT_ASSERT_MSG(0,
"Subclass should implement setSharedNameMapData, when applicable.");
536 myVisibleBoxCache.makeInvalid();
541 myBoxCache.setSerialized(b);
542 myVisibleBoxCache.makeInvalid();
546 myBoxCache.makeInvalid();
547 myVisibleBoxCache.makeInvalid();
554 static void copyPrimitiveGroups(
GU_Detail &dest,
585 virtual fpreal computeArea()
const;
587 virtual fpreal computePerimeter()
const;
604 template <
typename T>
608 template <
typename T>
617 bool myPointInstanceTransform;
virtual bool saveCachedBBox() const
SYS_FORCE_INLINE GU_PackedImpl * copyIfShared()
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
virtual bool unpackWithPrim(GU_Detail &destgdp, const UT_Matrix4D *transform, const GU_PrimPacked *prim) const
Used to pass options and map offset values during saving.
OIIO_UTIL_API bool copy(string_view from, string_view to, std::string &err)
GLsizei const GLchar *const * string
GLsizei const GLfloat * value
static const GEO_PackedNameMapPtr theNullPackedNameMapPtr
virtual bool unpackWithContext(GU_Detail &destgdp, GU_PackedContext &context, const GU_PrimPacked *prim) const
bool unpackToDetail(GU_Detail &destgdp, const GU_ConstDetailHandle &gdh, const UT_Matrix4D *transform) const
Unpack the source detail handle.
JSON reader class which handles parsing of JSON or bJSON files.
ImageBuf OIIO_API min(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
Class which writes ASCII or binary JSON streams.
A reference counter base class for use with UT_IntrusivePtr.
UT_SharedPtr< GA_SharedDataHandle > GA_SharedDataHandlePtr
virtual bool loadFromJSON(GU_PrimPacked *prim, const UT_JSONValueMap &options, const GA_LoadMap &map)
exint GA_Size
Defines the bit width for index and offset types in GA.
const char *(GU_PackedImpl::* StringGetter)(const GU_PrimPacked *) const
void setBoxCache(const T b[6])
#define UT_ASSERT_MSG(ZZ,...)
virtual bool isLoaded() const
UT_IntrusiveRefCounter & operator=(const UT_IntrusiveRefCounter &) noexcept
Assignment operator: Does not modify counter.
SYS_FORCE_INLINE uint32 use_count() const noexcept
Return current counter.
Map to translate from Alembic attribute names to Houdini names.
SYS_FORCE_INLINE bool isShared() const
virtual bool getVisibleBounds(UT_BoundingBox &box) const
int64 intrinsic16Tuple(const GU_PrimPacked *prim) const
void setBoxCache(const UT_BoundingBox &b)
virtual void forceLoad() const
const UT_BoundingBox & boxCache() const
bool intrinsicPointInstanceTransform(const GU_PrimPacked *prim) const
virtual void setFacesetAttribute(const UT_StringHolder &s)
const char *(GU_PackedImpl::* StringTupleGetter)(const GU_PrimPacked *, exint) const
const UT_StringHolder &(GU_PackedImpl::* StringHolderTupleGetter)(const GU_PrimPacked *, exint) const
virtual void setSharedNameMapData(GA_SharedDataHandlePtr s)
GLboolean GLboolean GLboolean b
GA_API const UT_StringHolder transform
int64 intrinsic9Tuple(const GU_PrimPacked *prim) const
virtual void setAttributeNameMap(const GEO_PackedNameMapPtr &m)
A map of string to various well defined value types.
SIM_API const UT_StringHolder force
bool pointInstanceTransform() const
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
GLubyte GLubyte GLubyte GLubyte w
const std::string &(GU_PackedImpl::* StdStringTupleGetter)(const GU_PrimPacked *, exint) const
int64 intrinsic6Tuple(const GU_PrimPacked *prim) const
int64 intrinsic3Tuple(const GU_PrimPacked *prim) const
virtual bool supportsJSONLoad() const
const GU_Detail * getGdp() const
virtual const GEO_PackedNameMapPtr & attributeNameMap() const