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; }
106 { sortClipsIfNeeded();
return *myClips(i); }
120 { sortTransformGroupsIfNeeded();
return myTransformGroups; }
131 {
return *myDefaultTransformGroup; }
135 { sortTransformGroupsIfNeeded();
return *myTransformGroups(i); }
145 { myMetadata =
data; }
156 { sortCustomDataItemsIfNeeded();
return myCustomDataItems; }
164 { sortCustomDataItemsIfNeeded();
return *myCustomDataItems[i]; }
172 using CustomDataItemConstructor =
173 std::function<GU_AgentCustomDataItemPtr (const GU_AgentDefinition &)>;
176 static void registerCustomDataItemType(
181 static void installCustomDataItemTypes();
184 void sortLayersIfNeeded()
const;
185 void sortClipsIfNeeded()
const;
186 void sortTransformGroupsIfNeeded()
const;
187 void sortCustomDataItemsIfNeeded()
const;
190 void addDefaultTransformGroup();
211 bool myAreLayersSorted;
212 bool myAreClipsSorted;
213 bool myAreTransformGroupsSorted;
214 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.
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.
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T clip(const T &p, const Box< T > &box) IMATH_NOEXCEPT
exint numCustomDataItems() const
Return the number of custom data items.
UT_IntrusivePtr< const GU_AgentDefinition > GU_AgentDefinitionConstPtr