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

Object holding information describing skeleton topology. More...

Public Member Functions

 UsdSkelTopology ()=default
 Construct an empty topology. More...
 
USDSKEL_API UsdSkelTopology (TfSpan< const TfToken > paths)
 Construct a skel topology from paths, an array holding ordered joint paths as tokens. More...
 
USDSKEL_API UsdSkelTopology (TfSpan< const SdfPath > paths)
 Construct a skel topology from paths, an array of joint paths. More...
 
USDSKEL_API UsdSkelTopology (const VtIntArray &parentIndices)
 Construct a skel topology from an array of parent indices. More...
 
USDSKEL_API bool Validate (std::string *reason=nullptr) const
 Validate the topology. More...
 
const VtIntArray & GetParentIndices () const
 
size_t GetNumJoints () const
 
size_t size () const
 
int GetParent (size_t index) const
 Returns the parent joint of the index'th joint, Returns -1 for joints with no parent (roots). More...
 
bool IsRoot (size_t index) const
 Returns true if the index'th joint is a root joint. More...
 
bool operator== (const UsdSkelTopology &o) const
 
bool operator!= (const UsdSkelTopology &o) const
 

Detailed Description

Object holding information describing skeleton topology.

This provides the hierarchical information needed to reason about joint relationships in a manner suitable to computations.

Definition at line 45 of file topology.h.

Constructor & Destructor Documentation

UsdSkelTopology ( )
default

Construct an empty topology.

USDSKEL_API UsdSkelTopology ( TfSpan< const TfToken paths)

Construct a skel topology from paths, an array holding ordered joint paths as tokens.

Internally, each token must be converted to an SdfPath. If SdfPath objects are already accessible, it is more efficient to use the construct taking an SdfPath array.

USDSKEL_API UsdSkelTopology ( TfSpan< const SdfPath paths)

Construct a skel topology from paths, an array of joint paths.

USDSKEL_API UsdSkelTopology ( const VtIntArray &  parentIndices)

Construct a skel topology from an array of parent indices.

For each joint, this provides the parent index of that joint, or -1 if none.

Member Function Documentation

int GetParent ( size_t  index) const
inline

Returns the parent joint of the index'th joint, Returns -1 for joints with no parent (roots).

Definition at line 100 of file topology.h.

bool IsRoot ( size_t  index) const
inline

Returns true if the index'th joint is a root joint.

Definition at line 86 of file topology.h.

USDSKEL_API bool Validate ( std::string *  reason = nullptr) const

Validate the topology.

If validation is unsuccessful, a reason why will be written to reason, if provided.


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