This document is for a version of USD that is under development. See this page for the current release.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
UsdSkelTopology Class Reference

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
 

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 28 of file topology.h.

Constructor & Destructor Documentation

◆ UsdSkelTopology() [1/4]

UsdSkelTopology ( )
default

Construct an empty topology.

◆ UsdSkelTopology() [2/4]

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.

◆ UsdSkelTopology() [3/4]

USDSKEL_API UsdSkelTopology ( TfSpan< const SdfPath paths)

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

◆ UsdSkelTopology() [4/4]

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

◆ GetNumJoints()

size_t GetNumJoints ( ) const
inline

Definition at line 60 of file topology.h.

◆ GetParent()

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 83 of file topology.h.

◆ GetParentIndices()

const VtIntArray & GetParentIndices ( ) const
inline

Definition at line 58 of file topology.h.

◆ IsRoot()

bool IsRoot ( size_t  index) const
inline

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

Definition at line 69 of file topology.h.

◆ operator!=()

bool operator!= ( const UsdSkelTopology o) const
inline

Definition at line 73 of file topology.h.

◆ size()

size_t size ( ) const
inline

Definition at line 62 of file topology.h.

◆ Validate()

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: