11 #ifndef __GU_PrimPacked__
12 #define __GU_PrimPacked__
37 bool add_impl_ref=
true);
68 {
return isPackedPrimitive(prim.
getTypeId()); }
71 static bool hasPackedPrimitives(
const GA_Detail &gdp);
79 static bool getPackedPrimitives(
const GA_Detail &gdp,
84 static exint clearCachedGeometry();
135 {
return sharedImplementation()->getBoundsCached(
b); }
139 {
return sharedImplementation()->getVisibleBoundsCached(
b); }
144 bool setPathAttribute(
const char *
value=NULL,
145 const char *attrib=
"path");
172 {
return sharedImplementation()->getPackedDetail(); }
174 {
return sharedImplementation()->getPackedDetail(&context); }
179 {
return sharedImplementation()->unpack(dest,
this); }
181 {
return sharedImplementation()->unpackWithContext(dest, context,
this); }
183 {
return sharedImplementation()->unpackUsingPolygons(dest,
this); }
192 return sharedImplementation()->unpackWithStyler(
193 dest, prim_styler_group, parent_styler,
this);
197 {
return sharedImplementation()->forceLoad(); }
200 {
return sharedImplementation()->isLoaded(); }
223 myImplementation = impl;
237 if (impl == myImplementation.get())
240 myImplementation.detach();
241 myImplementation.reset(impl, add_ref);
253 void multiplyByPrimTransform(
UT_Matrix4D &xform)
const;
257 void computeFullTransform4(
UT_Matrix4D &xform)
const;
SYS_FORCE_INLINE const GU_PackedImpl * sharedImplementation() const
fpreal calcPerimeter() const override=0
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
Used to pass options and map offset values during saving.
void normal(NormalComp &output) const override
virtual bool getUntransformedRenderingBounds(UT_BoundingBox &box) const =0
SYS_FORCE_INLINE bool getUntransformedBounds(UT_BoundingBox &b) const overridefinal
virtual bool loadOptions(const UT_Options &options, const GA_LoadMap &map)=0
SYS_FORCE_INLINE T * SYSconst_cast(const T *foo)
virtual const UT_StringHolder & facesetAttribute() const =0
SYS_FORCE_INLINE const GA_PrimitiveTypeId & getTypeId() const
GU_ConstDetailHandle getPackedDetail(GU_PackedContext &context) const
JSON reader class which handles parsing of JSON or bJSON files.
#define GA_DECLARE_INTRINSICS(OVERRIDE)
Class which writes ASCII or binary JSON streams.
virtual int64 getMemoryUsage() const
UT_SharedPtr< GA_SharedDataHandle > GA_SharedDataHandlePtr
void transform(const UT_Matrix4 &xform) override=0
virtual void setAttributeNameMap(const GEO_PackedNameMapPtr &m)=0
exint GA_Size
Defines the bit width for index and offset types in GA.
virtual const GEO_PackedNameMapPtr & attributeNameMap() const =0
virtual void attributeDirty()
#define GA_INVALID_OFFSET
bool unpackUsingPolygons(GU_Detail &dest) const
virtual void setFacesetAttribute(const UT_StringHolder &s)=0
#define SYS_DEPRECATED_REPLACE(__V__, __R__)
virtual void transformDirty()
bool isDegenerate() const override=0
bool unpack(GU_Detail &dest) const
SYS_FORCE_INLINE bool isShared() const
virtual void countMemory(UT_MemoryCounter &counter) const
virtual void getFullTransform4(UT_Matrix4D &matrix) const =0
virtual bool supportsJSONLoad() const =0
virtual void copyImplementation(const GEO_PrimPacked &src)=0
SYS_FORCE_INLINE bool getUntransformedVisibleBounds(UT_BoundingBox &b) const overridefinal
virtual void getVelocityRange(UT_Vector3 &vmin, UT_Vector3 &vmax) const =0
bool unpackWithContext(GU_Detail &dest, GU_PackedContext &context) const
GLboolean GLboolean GLboolean b
void stashed(bool beingstashed, GA_Offset offset=GA_INVALID_OFFSET) override
SYS_FORCE_INLINE const GU_PackedImpl * sharedImplementation()
bool registerSharedLoadData(int load_data_type, GA_SharedDataHandlePtr item) override=0
A map of string to various well defined value types.
virtual GU_PackedImpl * copy() const =0
Create a copy of this resolver.
bool saveSharedLoadData(UT_JSONWriter &w, GA_SaveMap &map, GA_GeometryIndex *geo_index) const override
virtual bool loadOptionsJSON(UT_JSONParser &p, const GA_LoadMap &map)=0
fpreal calcVolume(const UT_Vector3 &refpt) const override=0
virtual bool loadUnknownToken(const char *token, UT_JSONParser &p, const GA_LoadMap &map)=0
void normal(NormalCompD &output) const override
GU_ConstDetailHandle getPackedDetail() const
Container class for all geometry.
virtual GEO_Primitive * convert(GEO_ConvertParms &parms, GA_PointGroup *usedpts=0)=0
GLubyte GLubyte GLubyte GLubyte w
virtual void topologyDirty()
static bool isPackedPrimitive(const GA_Primitive &prim)
Definition of a geometric primitive.
SYS_FORCE_INLINE void setImplementation(const GU_PackedImpl *impl, bool add_ref=true, bool remove_ref=true)
virtual const GA_PrimitiveDefinition & getTypeDef() const =0
virtual bool saveOptions(UT_Options &options, const GA_SaveMap &map) const =0
SYS_FORCE_INLINE GU_PackedImpl * hardenImplementation()
virtual bool loadOptionsJSONMap(UT_JSONValueMap &options, const GA_LoadMap &map)=0
virtual GEO_Primitive * convertNew(GEO_ConvertParms &parms)=0
bool unpackWithStyler(GU_Detail &dest, STY_StylerGroup &prim_styler_group, const STY_Styler &parent_styler) const
fpreal calcArea() const override=0