HDK
|
#include <GU_AgentDefinition.h>
Public Types | |
using | CustomDataItemConstructor = std::function< GU_AgentCustomDataItemPtr(const GU_AgentDefinition &)> |
Static Public Member Functions | |
static void | registerCustomDataItemType (const UT_StringHolder &dataitemtype, CustomDataItemConstructor constructor) |
Register a new custom data item type. More... | |
static void | installCustomDataItemTypes () |
Called by GU_Agent during startup to register custom data item types. More... | |
Additional Inherited Members | |
![]() | |
SYS_FORCE_INLINE | ~UT_IntrusiveRefCounter () |
Destructor: Only derived classes can destruct this. More... | |
An agent definition contains a rig, a shape library, a set of available clips, a set of available layers, and a set of transform groups.
Definition at line 35 of file GU_AgentDefinition.h.
using GU_AgentDefinition::CustomDataItemConstructor = std::function<GU_AgentCustomDataItemPtr (const GU_AgentDefinition &)> |
Constructs a new instance of a GU_AgentCustomDataItem. The provided agent definition can be used if the data item requires references to the rig, shape library, etc.
Definition at line 173 of file GU_AgentDefinition.h.
GU_AgentDefinition::GU_AgentDefinition | ( | ) |
GU_AgentDefinition::GU_AgentDefinition | ( | const GU_AgentRigConstPtr & | rig, |
const GU_AgentShapeLibConstPtr & | shapelib | ||
) |
GU_AgentDefinition::GU_AgentDefinition | ( | const GU_AgentDefinition & | src_defn, |
const GU_AgentShapeLibConstPtr & | new_shapelib, | ||
const GU_AgentRigConstPtr & | new_rig = nullptr |
||
) |
Create a copy of the given agent definition, but referencing a new version of the shape library and/or rig.
void GU_AgentDefinition::addClip | ( | const GU_AgentClipConstPtr & | clip | ) |
Add a clip to the agent definition. Replaces any pre-existing clip of the same name.
void GU_AgentDefinition::addCustomDataItem | ( | const GU_AgentCustomDataItemConstPtr & | data | ) |
Add a custom data item to the agent definition. Replaces any pre-existing item of the same name.
void GU_AgentDefinition::addLayer | ( | const GU_AgentLayerConstPtr & | layer | ) |
Add a layer to the agent definition. Replaces any pre-existing layer of the same name.
void GU_AgentDefinition::addTransformGroup | ( | const GU_AgentTransformGroupConstPtr & | group | ) |
Add a transform group to the agent definition. Replaces any pre-existing group of the same name.
const GU_AgentClip* GU_AgentDefinition::clip | ( | const UT_StringRef & | name | ) | const |
Get a pointer to a specfic clip. This may be a NULL pointer.
|
inline |
Get a reference to the ith clip.
Definition at line 105 of file GU_AgentDefinition.h.
exint GU_AgentDefinition::clipIndex | ( | const UT_StringRef & | name | ) | const |
Get the index of a clip, or -1 if it does not exist.
|
inline |
Return the list of clips.
Definition at line 95 of file GU_AgentDefinition.h.
const GU_AgentCustomDataItem* GU_AgentDefinition::customDataItem | ( | const UT_StringRef & | name | ) | const |
Get a pointer to a specfic data item by name. This may be a NULL pointer.
|
inline |
Get a reference to the ith custom data item.
Definition at line 163 of file GU_AgentDefinition.h.
|
inline |
Return the list of custom data items.
Definition at line 155 of file GU_AgentDefinition.h.
|
inline |
Get the default transform group, which contains all transforms in the rig.
Definition at line 130 of file GU_AgentDefinition.h.
int64 GU_AgentDefinition::getMemoryUsage | ( | bool | inclusive | ) | const |
|
static |
Called by GU_Agent during startup to register custom data item types.
const GU_AgentLayer* GU_AgentDefinition::layer | ( | const UT_StringRef & | name | ) | const |
Get a pointer to a specfic layer. This may be a NULL pointer.
|
inline |
Get a reference to the ith layer.
Definition at line 81 of file GU_AgentDefinition.h.
exint GU_AgentDefinition::layerIndex | ( | const UT_StringRef & | name | ) | const |
Get the index of a layer, or -1 if it does not exist.
|
inline |
Return the list of layers.
Definition at line 71 of file GU_AgentDefinition.h.
bool GU_AgentDefinition::load | ( | UT_JSONParser & | p | ) |
Loads the agent definition from JSON. Used when loading agent primitives from a geometry file.
|
inline |
Return the metadata dictionary. This may be a nullptr.
Definition at line 141 of file GU_AgentDefinition.h.
|
inline |
Return the clip count.
Definition at line 109 of file GU_AgentDefinition.h.
|
inline |
Return the number of custom data items.
Definition at line 167 of file GU_AgentDefinition.h.
|
inline |
Return the layer count.
Definition at line 85 of file GU_AgentDefinition.h.
|
inline |
Return the transform group count.
Definition at line 138 of file GU_AgentDefinition.h.
|
static |
Register a new custom data item type.
void GU_AgentDefinition::removeClip | ( | const UT_StringRef & | name | ) |
Remove a clip from the agent definition by name.
void GU_AgentDefinition::removeCustomDataItem | ( | const UT_StringRef & | name | ) |
Remove a custom data item from the agent definition by name.
void GU_AgentDefinition::removeLayer | ( | const UT_StringRef & | name | ) |
Remove a layer from the agent definition by name.
void GU_AgentDefinition::removeTransformGroup | ( | const UT_StringRef & | name | ) |
Remove a transform group from the agent definition by name.
|
inline |
Definition at line 60 of file GU_AgentDefinition.h.
bool GU_AgentDefinition::save | ( | UT_JSONWriter & | w | ) | const |
Saves the agent definition to JSON. Used when saving agent primitives to a geometry file.
|
inline |
Replace the metadata dictionary.
Definition at line 144 of file GU_AgentDefinition.h.
|
inline |
Definition at line 61 of file GU_AgentDefinition.h.
const GU_AgentTransformGroup* GU_AgentDefinition::transformGroup | ( | const UT_StringRef & | name | ) | const |
Get a pointer to a specfic group. This may be a NULL pointer.
|
inline |
Get a reference to the ith group.
Definition at line 134 of file GU_AgentDefinition.h.
exint GU_AgentDefinition::transformGroupIndex | ( | const UT_StringRef & | name | ) | const |
Get the index of a transform group, or -1 if it does not exist.
|
inline |
Return the list of groups.
Definition at line 119 of file GU_AgentDefinition.h.