|
Object holding information describing skeleton topology. More...
#include <topology.h>
Public Member Functions | |
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. | |
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. | |
USDSKEL_API bool | Validate (std::string *reason=nullptr) const |
Validate the topology. | |
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). | |
bool | IsRoot (size_t index) const |
Returns true if the index'th joint is a root joint. | |
bool | operator== (const UsdSkelTopology &o) const |
bool | operator!= (const UsdSkelTopology &o) const |
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 28 of file topology.h.
|
default |
Construct an empty topology.
USDSKEL_API UsdSkelTopology | ( | TfSpan< const TfToken > | paths | ) |
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.
|
inline |
Definition at line 60 of file topology.h.
|
inline |
Returns the parent joint of the index'th
joint, Returns -1 for joints with no parent (roots).
Definition at line 83 of file topology.h.
|
inline |
Definition at line 58 of file topology.h.
|
inline |
Returns true if the index'th
joint is a root joint.
Definition at line 69 of file topology.h.
|
inline |
Definition at line 73 of file topology.h.
|
inline |
Definition at line 62 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.