7#ifndef PXR_USD_USD_SKEL_TOPOLOGY_H
8#define PXR_USD_USD_SKEL_TOPOLOGY_H
13#include "pxr/usd/usdSkel/api.h"
16#include "pxr/usd/sdf/path.h"
20PXR_NAMESPACE_OPEN_SCOPE
56 bool Validate(std::string* reason=
nullptr)
const;
58 const VtIntArray& GetParentIndices()
const {
return _parentIndices; }
60 size_t GetNumJoints()
const {
return size(); }
62 size_t size()
const {
return _parentIndices.size(); }
78 VtIntArray _parentIndices;
86 return _parentIndices[index];
90PXR_NAMESPACE_CLOSE_SCOPE
Represents a range of contiguous elements.
Object holding information describing skeleton topology.
bool IsRoot(size_t index) const
Returns true if the index'th joint is a root joint.
UsdSkelTopology()=default
Construct an empty topology.
int GetParent(size_t index) const
Returns the parent joint of the index'th joint, Returns -1 for joints with no parent (roots).
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.
USDSKEL_API UsdSkelTopology(TfSpan< const SdfPath > paths)
Construct a skel topology from paths, an array of joint paths.
USDSKEL_API UsdSkelTopology(TfSpan< const TfToken > paths)
Construct a skel topology from paths, an array holding ordered joint paths as tokens.
#define TF_DEV_AXIOM(cond)
The same as TF_AXIOM, but compiled only in dev builds.