HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GU_AgentRig Class Reference

A rig for the agent primitive. More...

#include <GU_AgentRig.h>

+ Inheritance diagram for GU_AgentRig:

Classes

class  const_iterator
 

Public Types

typedef UT_StringMap< exintNameMapType
 
typedef NameMapType::const_iterator NameMapConstIter
 
typedef NameMapType::iterator NameMapIter
 

Public Member Functions

 ~GU_AgentRig ()
 
bool construct (const UT_StringArray &names, const UT_IntArray &child_counts, const UT_IntArray &children)
 
int64 getMemoryUsage (bool inclusive) const
 
const UT_StringHoldername () const
 Return the name of the rig. More...
 
void setName (const UT_StringHolder &name)
 Set the name of the rig. More...
 
bool isFile () const
 Return whether the rig was loaded from disk. More...
 
void clearIsFile ()
 Clear the flag marking that the rig references a file on disk. More...
 
void clear ()
 Clear the rig. More...
 
bool checkValid () const
 Check validity of rig. More...
 
exint transformCount () const
 Return number of transforms. More...
 
const UT_StringHoldertransformName (exint i) const
 Return the name of the given transform. More...
 
exint parentIndex (exint i) const
 Return the parent of the given transform (or -1 for the root) More...
 
exint childCount (exint i) const
 Return the number of children for the given transform. More...
 
exint childIndex (exint transform, exint child) const
 Return the Nth child for the given transform. More...
 
const UT_IntArrayroots () const
 Return the root transform(s) of the rig. More...
 
exint findTransform (const UT_StringRef &name) const
 Find a transform by name. Returns -1 for an invalid name. More...
 
bool save (UT_JSONWriter &w) const
 Save a rig. More...
 
bool load (UT_JSONParser &p, UT_StringArray &errors)
 Load a rig. More...
 
void dump () const
 Dump to stdout for debugging. More...
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< GU_AgentRig >
SYS_FORCE_INLINE UT_IntrusiveRefCounter ()
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &)
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &)
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const
 Return current counter. More...
 

Static Public Member Functions

static GU_AgentRigPtr addRig (const char *name)
 
static GU_AgentRigPtr addRigFromFile (const char *filename, UT_StringArray &errors)
 

Additional Inherited Members

- Protected Member Functions inherited from UT_IntrusiveRefCounter< GU_AgentRig >
SYS_FORCE_INLINE ~UT_IntrusiveRefCounter ()
 Destructor: Only derived classes can destruct this. More...
 

Detailed Description

A rig for the agent primitive.

Examples:
SOP/SOP_BouncyAgent.C.

Definition at line 34 of file GU_AgentRig.h.

Member Typedef Documentation

Definition at line 39 of file GU_AgentRig.h.

Definition at line 37 of file GU_AgentRig.h.

Constructor & Destructor Documentation

GU_AgentRig::~GU_AgentRig ( )

Member Function Documentation

static GU_AgentRigPtr GU_AgentRig::addRig ( const char *  name)
static
static GU_AgentRigPtr GU_AgentRig::addRigFromFile ( const char *  filename,
UT_StringArray errors 
)
static
bool GU_AgentRig::checkValid ( ) const

Check validity of rig.

exint GU_AgentRig::childCount ( exint  i) const
inline

Return the number of children for the given transform.

Definition at line 100 of file GU_AgentRig.h.

exint GU_AgentRig::childIndex ( exint  transform,
exint  child 
) const
inline

Return the Nth child for the given transform.

Definition at line 105 of file GU_AgentRig.h.

void GU_AgentRig::clear ( )

Clear the rig.

void GU_AgentRig::clearIsFile ( )

Clear the flag marking that the rig references a file on disk.

bool GU_AgentRig::construct ( const UT_StringArray names,
const UT_IntArray child_counts,
const UT_IntArray children 
)

Construct using flat arrays.

  • names: The array of names for each transform (one per transform)
  • child_counts: An array of child counts for each transform Should have the same number of entries as the names array
  • children: An array of children. This is the concatenation of all the child indices for each transform. There should be sum(child_counts) entries in this array.
void GU_AgentRig::dump ( ) const

Dump to stdout for debugging.

exint GU_AgentRig::findTransform ( const UT_StringRef name) const
inline

Find a transform by name. Returns -1 for an invalid name.

Definition at line 206 of file GU_AgentRig.h.

int64 GU_AgentRig::getMemoryUsage ( bool  inclusive) const
bool GU_AgentRig::isFile ( ) const
inline

Return whether the rig was loaded from disk.

Definition at line 79 of file GU_AgentRig.h.

bool GU_AgentRig::load ( UT_JSONParser p,
UT_StringArray errors 
)

Load a rig.

const UT_StringHolder& GU_AgentRig::name ( void  ) const
inline

Return the name of the rig.

Definition at line 72 of file GU_AgentRig.h.

exint GU_AgentRig::parentIndex ( exint  i) const
inline

Return the parent of the given transform (or -1 for the root)

Definition at line 97 of file GU_AgentRig.h.

const UT_IntArray& GU_AgentRig::roots ( ) const
inline

Return the root transform(s) of the rig.

Definition at line 111 of file GU_AgentRig.h.

bool GU_AgentRig::save ( UT_JSONWriter w) const

Save a rig.

void GU_AgentRig::setName ( const UT_StringHolder name)
inline

Set the name of the rig.

Definition at line 75 of file GU_AgentRig.h.

exint GU_AgentRig::transformCount ( ) const
inline

Return number of transforms.

Definition at line 91 of file GU_AgentRig.h.

const UT_StringHolder& GU_AgentRig::transformName ( exint  i) const
inline

Return the name of the given transform.

Examples:
SOP/SOP_BouncyAgent.C.

Definition at line 94 of file GU_AgentRig.h.


The documentation for this class was generated from the following file: