11 #ifndef __GU_AgentShapeLib__
12 #define __GU_AgentShapeLib__
54 typedef void (*ShapeRemovedCallback)(
void *
data,
int shape_id);
72 bool keep_external_ref);
76 static void registerShapeRemovedCallback(
77 ShapeRemovedCallback cb,
void *
data = 0);
78 static void unregisterShapeRemovedCallback(
79 ShapeRemovedCallback cb,
void *
data = 0);
90 int64 getMemoryUsage(
bool inclusive)
const;
104 bool replace_existing=
true);
109 bool replace_existing=
true);
117 {
return myShapeCache.empty(); }
119 {
return myShapeCache.size(); }
150 void dump(std::ostream& os,
151 const char* save_file = 0)
const;
155 void getDanglingShapes(
160 const_iterator
begin()
const;
161 const_iterator
end()
const;
173 CycleDetect &cycle_detect,
178 CycleDetect &cycle_detect);
184 void includeShapeLib(
188 void destroyShape(const_iterator &it);
189 bool replaceExistingShape(
191 bool replace_existing);
197 bool loadShapesFromDetail(CycleDetect &cycle_detect,
204 ShapeMap myShapeCache;
221 int64 getMemoryUsage(
bool inclusive)
const;
222 int uniqueId()
const {
return myUniqueId; }
230 getLinearSkinDeformerSourceWeights(
234 ShapeData(
const ShapeData &) =
delete;
244 Shape(
const Shape &shape);
246 int64 getMemoryUsage(
bool inclusive)
const;
250 int uniqueId()
const {
return myShapeData->uniqueId(); }
261 return myShapeData->getLinearSkinDeformerSourceWeights(gdh);
267 return getLinearSkinDeformerSourceWeights(shapeGeometry(shapelib));
272 ShapeDataPtr myShapeData;
GT_API const UT_StringHolder filename
GLuint GLsizei const GLchar * label
const GU_LinearSkinDeformerSourceWeights & getLinearSkinDeformerSourceWeights(const GU_ConstDetailHandle &gdh) const
JSON reader class which handles parsing of JSON or bJSON files.
Class which writes ASCII or binary JSON streams.
A reference counter base class for use with UT_IntrusivePtr.
UT_IntrusivePtr< GU_AgentShapeLib > GU_AgentShapeLibPtr
GU_ConstDetailHandle detail() const
Get a reference to the underlying geometry (which holds all the shapes)
const UT_StringHolder & name() const
Parent::iterator iterator
void setOffset(GA_Offset offset)
UT_StringMap< ShapePtr > ShapeMap
UT_Array< GU_AgentShapeLibConstPtr > GU_AgentShapeLibArray
const GU_LinearSkinDeformerSourceWeights & getLinearSkinDeformerSourceWeights(const GU_AgentShapeLib &shapelib) const
Wrapper around hboost::intrusive_ptr.
ShapeMap::const_iterator const_iterator
bool isFile() const
Return whether the library was loaded from disk.
GLuint const GLchar * name
ShapeMap::iterator iterator
Parent::const_iterator const_iterator
UT_IntrusivePtr< const GU_AgentShapeLib > GU_AgentShapeLibConstPtr
GLubyte GLubyte GLubyte GLubyte w
UT_IntrusivePtr< const Shape > ShapePtr
void setName(const UT_StringHolder &name)
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.