11 #ifndef __GU_AgentDefinition__
12 #define __GU_AgentDefinition__
50 int64 getMemoryUsage(
bool inclusive)
const;
78 {
return myLayersIndex.get(name, -1); }
88 void sortLayersIfNeeded();
105 {
return myClipsIndex.get(name, -1); }
115 void sortClipsIfNeeded();
126 {
return myTransformGroups; }
133 {
return myTransformGroupsIndex.get(name, -1); }
138 {
return *myDefaultTransformGroup; }
142 {
return *myTransformGroups(i); }
149 void sortTransformGroupsIfNeeded();
156 { myMetadata =
data; }
167 {
return myCustomDataItems; }
175 {
return *myCustomDataItems[i]; }
182 void sortCustomDataItemsIfNeeded();
187 using CustomDataItemConstructor =
191 static void registerCustomDataItemType(
196 static void installCustomDataItemTypes();
202 void sortItemsIfNeeded();
206 void addDefaultTransformGroup();
227 bool myAreLayersSorted;
228 bool myAreClipsSorted;
229 bool myAreTransformGroupsSorted;
230 bool myAreCustomDataItemsSorted;
237 return (idx >= 0) ? myLayers[idx].get() :
nullptr;
244 return (idx >= 0) ? myClips[idx].get() :
nullptr;
251 return (idx >= 0) ? myTransformGroups[idx].get() :
nullptr;
257 const exint idx = myCustomDataItemsIndex.
get(name, -1);
258 return (idx >= 0) ? myCustomDataItems[idx].get() :
nullptr;
const GU_AgentLayer * layer(const UT_StringRef &name) const
Get a pointer to a specfic layer. This may be a NULL pointer.
exint transformGroupIndex(const UT_StringRef &name) const
Get the index of a transform group, or -1 if it does not exist.
UT_Function< GU_AgentCustomDataItemPtr(const GU_AgentDefinition &)> CustomDataItemConstructor
const GU_AgentMetadataConstPtr & metadata() const
Return the metadata dictionary. This may be a nullptr.
exint numTransformGroups() const
Return the transform group count.
const GU_AgentTransformGroup & defaultTransformGroup() const
#define SYS_VISIBILITY_EXPORT
const UT_Array< GU_AgentClipConstPtr > & clips() const
Return the list of clips.
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.
A reference counter base class for use with UT_IntrusivePtr.
const GU_AgentShapeLibConstPtr & shapeLibrary() const
UT_IntrusivePtr< GU_AgentDefinition > GU_AgentDefinitionPtr
GLenum GLuint GLint GLint layer
exint numLayers() const
Return the layer count.
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(const UT_StringRef &name) const
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 GU_AgentClip * clip(const UT_StringRef &name) const
Get a pointer to a specfic clip. This may be a NULL pointer.
GLuint const GLchar * name
std::function< T > UT_Function
const GU_AgentTransformGroup * transformGroup(const UT_StringRef &name) const
Get a pointer to a specfic group. This may be a NULL pointer.
const UT_Array< GU_AgentTransformGroupConstPtr > & transformGroups() const
Return the list of groups.
SYS_FORCE_INLINE ITEM_T get(const UT_StringRef &key, const ITEM_T &defval) const
GLubyte GLubyte GLubyte GLubyte w
const UT_Array< GU_AgentCustomDataItemConstPtr > & customDataItems() const
Return the list of custom data items.
exint layerIndex(const UT_StringRef &name) const
Get the index of a layer, or -1 if it does not exist.
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T clip(const T &p, const Box< T > &box) IMATH_NOEXCEPT
exint clipIndex(const UT_StringRef &name) const
Get the index of a clip, or -1 if it does not exist.
exint numCustomDataItems() const
Return the number of custom data items.
UT_IntrusivePtr< const GU_AgentDefinition > GU_AgentDefinitionConstPtr