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

#include <GU_AgentTransformGroup.h>

+ Inheritance diagram for GU_AgentTransformGroup:

Classes

struct  GroupData
 Used to store the result of parsing the JSON file. More...
 

Public Member Functions

 ~GU_AgentTransformGroup ()
 
bool construct (const UT_ExintArray &transforms, const UT_FprealArray &weights, const UT_ExintArray &channels, UT_StringArray &errors)
 Build from a list of transform indices & weights, and channels. More...
 
int64 getMemoryUsage (bool inclusive) const
 
const UT_StringHoldername () const
 Name of the group. More...
 
bool isFile () const
 Returns whether the group was loaded from disk. More...
 
void clearIsFile ()
 Clear the flag marking that the group references a file on disk. More...
 
const UT_StringHolderfileName () const
 Returns the file that the group was loaded from. More...
 
const GU_AgentRigConstPtrrig () const
 The referenced rig. More...
 
const UT_BitArraytransforms () const
 Ordered list of transform indices in the group. More...
 
fpreal weight (exint i) const
 
bool hasTrivialWeights () const
 Returns true if all joints in the group have a weight of 1. More...
 
const UT_BitArraychannels () const
 Ordered list of channel indices in the group. More...
 
bool save (UT_JSONWriter &w) const
 Save to JSON. More...
 
bool load (UT_JSONParser &p)
 Load from JSON. More...
 
- Public Member Functions inherited from UT_IntrusiveRefCounter< GU_AgentTransformGroup >
SYS_FORCE_INLINE UT_IntrusiveRefCounter () noexcept
 Default constructor: Sets counter to 0. More...
 
SYS_FORCE_INLINE UT_IntrusiveRefCounter (const UT_IntrusiveRefCounter &) noexcept
 Copy constructor: Sets counter to 0. More...
 
UT_IntrusiveRefCounteroperator= (const UT_IntrusiveRefCounter &) noexcept
 Assignment operator: Does not modify counter. More...
 
SYS_FORCE_INLINE uint32 use_count () const noexcept
 Return current counter. More...
 
SYS_FORCE_INLINE bool conditionalAddRef () noexcept
 

Static Public Member Functions

static GU_AgentTransformGroupPtr addGroup (const UT_StringHolder &name, const GU_AgentRigConstPtr &rig)
 
static GU_AgentTransformGroupPtr addGroupFromFile (const UT_StringHolder &filename, const GU_AgentRigConstPtr &rig, UT_StringArray &errors)
 
static GU_AgentTransformGroupPtr addGroupCopy (const GU_AgentTransformGroup &src, const GU_AgentRigConstPtr &rig, bool copy_external_ref)
 
static bool load (UT_JSONParser &p, GroupData &data)
 
bool load (const GroupData &data, UT_StringArray &errors)
 

Additional Inherited Members

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

Detailed Description

Specifies a subset of the transforms (and channels) in the agent's rig, which is useful for things such as clip blending.

Definition at line 33 of file GU_AgentTransformGroup.h.

Constructor & Destructor Documentation

GU_AgentTransformGroup::~GU_AgentTransformGroup ( )

Member Function Documentation

static GU_AgentTransformGroupPtr GU_AgentTransformGroup::addGroup ( const UT_StringHolder name,
const GU_AgentRigConstPtr rig 
)
static
static GU_AgentTransformGroupPtr GU_AgentTransformGroup::addGroupCopy ( const GU_AgentTransformGroup src,
const GU_AgentRigConstPtr rig,
bool  copy_external_ref 
)
static

Create a clone of the group, referencing the specified rig. 'copy_external_ref' should be disabled if the new group will be further modified.

static GU_AgentTransformGroupPtr GU_AgentTransformGroup::addGroupFromFile ( const UT_StringHolder filename,
const GU_AgentRigConstPtr rig,
UT_StringArray errors 
)
static
const UT_BitArray& GU_AgentTransformGroup::channels ( ) const
inline

Ordered list of channel indices in the group.

Definition at line 104 of file GU_AgentTransformGroup.h.

void GU_AgentTransformGroup::clearIsFile ( )

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

bool GU_AgentTransformGroup::construct ( const UT_ExintArray transforms,
const UT_FprealArray weights,
const UT_ExintArray channels,
UT_StringArray errors 
)

Build from a list of transform indices & weights, and channels.

const UT_StringHolder& GU_AgentTransformGroup::fileName ( ) const
inline

Returns the file that the group was loaded from.

Definition at line 84 of file GU_AgentTransformGroup.h.

int64 GU_AgentTransformGroup::getMemoryUsage ( bool  inclusive) const
bool GU_AgentTransformGroup::hasTrivialWeights ( ) const
inline

Returns true if all joints in the group have a weight of 1.

Definition at line 101 of file GU_AgentTransformGroup.h.

bool GU_AgentTransformGroup::isFile ( ) const
inline

Returns whether the group was loaded from disk.

Definition at line 80 of file GU_AgentTransformGroup.h.

bool GU_AgentTransformGroup::load ( UT_JSONParser p)

Load from JSON.

static bool GU_AgentTransformGroup::load ( UT_JSONParser p,
GroupData data 
)
static

Parse the JSON file into an intermediate format, which can be used to finish loading the group at a later time (e.g. after the rig has also been loaded).

bool GU_AgentTransformGroup::load ( const GroupData data,
UT_StringArray errors 
)

Parse the JSON file into an intermediate format, which can be used to finish loading the group at a later time (e.g. after the rig has also been loaded).

const UT_StringHolder& GU_AgentTransformGroup::name ( ) const
inline

Name of the group.

Definition at line 77 of file GU_AgentTransformGroup.h.

const GU_AgentRigConstPtr& GU_AgentTransformGroup::rig ( ) const
inline

The referenced rig.

Definition at line 91 of file GU_AgentTransformGroup.h.

bool GU_AgentTransformGroup::save ( UT_JSONWriter w) const

Save to JSON.

const UT_BitArray& GU_AgentTransformGroup::transforms ( ) const
inline

Ordered list of transform indices in the group.

Definition at line 94 of file GU_AgentTransformGroup.h.

fpreal GU_AgentTransformGroup::weight ( exint  i) const
inline

Returns the weight of the specified joint (0 is returned if the joint is not in the transform group).

Definition at line 98 of file GU_AgentTransformGroup.h.


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