11 #ifndef __GU_AgentDefinition__
12 #define __GU_AgentDefinition__
50 int64 getMemoryUsage(
bool inclusive)
const;
72 { sortLayersIfNeeded();
return myLayers; }
82 { sortLayersIfNeeded();
return *myLayers(i); }
96 { sortClipsIfNeeded();
return myClips; }
103 { sortClipsIfNeeded();
return *myClips(i); }
117 { sortTransformGroupsIfNeeded();
return myTransformGroups; }
128 {
return *myDefaultTransformGroup; }
132 { sortTransformGroupsIfNeeded();
return *myTransformGroups(i); }
142 { myMetadata =
data; }
153 { sortCustomDataItemsIfNeeded();
return myCustomDataItems; }
161 { sortCustomDataItemsIfNeeded();
return *myCustomDataItems[i]; }
169 using CustomDataItemConstructor =
170 std::function<GU_AgentCustomDataItemPtr (const GU_AgentDefinition &)>;
173 static void registerCustomDataItemType(
178 static void installCustomDataItemTypes();
181 void sortLayersIfNeeded()
const;
182 void sortClipsIfNeeded()
const;
183 void sortTransformGroupsIfNeeded()
const;
184 void sortCustomDataItemsIfNeeded()
const;
187 void addDefaultTransformGroup();
208 bool myAreLayersSorted;
209 bool myAreClipsSorted;
210 bool myAreTransformGroupsSorted;
211 bool myAreCustomDataItemsSorted;
const GU_AgentMetadataConstPtr & metadata() const
Return the metadata dictionary. This may be a nullptr.
exint numTransformGroups() const
Return the transform group count.
GLenum GLuint GLint GLint layer
const GU_AgentTransformGroup & defaultTransformGroup() const
#define SYS_VISIBILITY_EXPORT
const UT_Array< GU_AgentClipConstPtr > & clips() const
Return the list of clips.
std::function< GU_AgentCustomDataItemPtr(const GU_AgentDefinition &)> CustomDataItemConstructor
const UT_Array< GU_AgentLayerConstPtr > & layers() const
Return the list of layers.
JSON reader class which handles parsing of JSON or bJSON files.
Class which writes ASCII or binary JSON streams.
GLuint const GLchar * name
A reference counter base class for use with UT_IntrusivePtr.
const GU_AgentShapeLibConstPtr & shapeLibrary() const
UT_IntrusivePtr< GU_AgentDefinition > GU_AgentDefinitionPtr
exint numLayers() const
Return the layer count.
GLubyte GLubyte GLubyte GLubyte w
const GU_AgentRigConstPtr & rig() const
const GU_AgentLayer & layer(exint i) const
Get a reference to the ith layer.
const GU_AgentTransformGroup & transformGroup(exint i) const
Get a reference to the ith group.
SYS_VISIBILITY_EXPORT void GUregisterAgentCustomDataItemType()
Entry point for registering custom data item types.
exint numClips() const
Return the clip count.
const GU_AgentCustomDataItem & customDataItem(exint i) const
Get a reference to the ith custom data item.
void setMetadata(const GU_AgentMetadataConstPtr &data)
Replace the metadata dictionary.
const GU_AgentClip & clip(exint i) const
Get a reference to the ith clip.
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER T clip(const T &p, const Box< T > &box)
const UT_Array< GU_AgentTransformGroupConstPtr > & transformGroups() const
Return the list of groups.
const UT_Array< GU_AgentCustomDataItemConstPtr > & customDataItems() const
Return the list of custom data items.
exint numCustomDataItems() const
Return the number of custom data items.
UT_IntrusivePtr< const GU_AgentDefinition > GU_AgentDefinitionConstPtr