|
Primary interface to reading bound skeleton data. More...
#include <skeletonQuery.h>
Public Member Functions | |
bool | IsValid () const |
Return true if this query is valid. | |
operator bool () const | |
Boolean conversion operator. Equivalent to IsValid(). | |
USDSKEL_API bool | HasBindPose () const |
Returns true if the size of the array returned by skeleton::GetBindTransformsAttr() matches the number of joints in the skeleton. | |
USDSKEL_API bool | HasRestPose () const |
Returns true if the size of the array returned by skeleton::GetRestTransformsAttr() matches the number of joints in the skeleton. | |
USDSKEL_API UsdPrim | GetPrim () const |
Returns the underlying Skeleton primitive corresponding to the bound skeleton instance, if any. | |
USDSKEL_API const UsdSkelSkeleton & | GetSkeleton () const |
Returns the bound skeleton instance, if any. | |
USDSKEL_API const UsdSkelAnimQuery & | GetAnimQuery () const |
Returns the animation query that provides animation for the bound skeleton instance, if any. | |
USDSKEL_API const UsdSkelTopology & | GetTopology () const |
Returns the topology of the bound skeleton instance, if any. | |
USDSKEL_API const UsdSkelAnimMapper & | GetMapper () const |
Returns a mapper for remapping from the bound animation, if any, to the Skeleton. | |
USDSKEL_API VtTokenArray | GetJointOrder () const |
Returns an array of joint paths, given as tokens, describing the order and parent-child relationships of joints in the skeleton. | |
template<typename Matrix4 > | |
USDSKEL_API bool | ComputeJointLocalTransforms (VtArray< Matrix4 > *xforms, UsdTimeCode time, bool atRest=false) const |
Compute joint transforms in joint-local space, at time . | |
template<typename Matrix4 > | |
USDSKEL_API bool | ComputeJointSkelTransforms (VtArray< Matrix4 > *xforms, UsdTimeCode time, bool atRest=false) const |
Compute joint transforms in skeleton space, at time . | |
template<typename Matrix4 > | |
USDSKEL_API bool | ComputeJointRestRelativeTransforms (VtArray< Matrix4 > *xforms, UsdTimeCode time) const |
Compute joint transforms which, when concatenated against the rest pose, produce joint transforms in joint-local space. | |
template<typename Matrix4 > | |
USDSKEL_API bool | ComputeJointWorldTransforms (VtArray< Matrix4 > *xforms, UsdGeomXformCache *xfCache, bool atRest=false) const |
Compute joint transforms in world space, at whatever time is configured on xfCache . | |
template<typename Matrix4 > | |
USDSKEL_API bool | ComputeSkinningTransforms (VtArray< Matrix4 > *xforms, UsdTimeCode time) const |
Compute transforms representing the change in transformation of a joint from its rest pose, in skeleton space. | |
template<typename Matrix4 > | |
USDSKEL_API bool | GetJointWorldBindTransforms (VtArray< Matrix4 > *xforms) const |
Returns the world space joint transforms at bind time. | |
USDSKEL_API std::string | GetDescription () const |
Friends | |
class | UsdSkel_CacheImpl |
bool | operator== (const UsdSkelSkeletonQuery &lhs, const UsdSkelSkeletonQuery &rhs) |
Equality comparison. | |
bool | operator!= (const UsdSkelSkeletonQuery &lhs, const UsdSkelSkeletonQuery &rhs) |
Inequality comparison. | |
USDSKEL_API friend size_t | hash_value (const UsdSkelSkeletonQuery &query) |
Primary interface to reading bound skeleton data.
This is used to query properties such as resolved transforms and animation bindings, as bound through the UsdSkelBindingAPI.
A UsdSkelSkeletonQuery can not be constructed directly, and instead must be constructed through a UsdSkelCache instance. This is done as follows:
Definition at line 53 of file skeletonQuery.h.
|
inline |
Definition at line 56 of file skeletonQuery.h.
USDSKEL_API bool ComputeJointLocalTransforms | ( | VtArray< Matrix4 > * | xforms, |
UsdTimeCode | time, | ||
bool | atRest = false |
||
) | const |
Compute joint transforms in joint-local space, at time
.
This returns transforms in joint order of the skeleton. If atRest
is false and an animation source is bound, local transforms defined by the animation are mapped into the skeleton's joint order. Any transforms not defined by the animation source use the transforms from the rest pose as a fallback value. If valid transforms cannot be computed for the animation source, the xforms
are instead set to the rest transforms.
USDSKEL_API bool ComputeJointRestRelativeTransforms | ( | VtArray< Matrix4 > * | xforms, |
UsdTimeCode | time | ||
) | const |
Compute joint transforms which, when concatenated against the rest pose, produce joint transforms in joint-local space.
More specifically, this computes restRelativeTransform in:
USDSKEL_API bool ComputeJointSkelTransforms | ( | VtArray< Matrix4 > * | xforms, |
UsdTimeCode | time, | ||
bool | atRest = false |
||
) | const |
Compute joint transforms in skeleton space, at time
.
This concatenates joint transforms as computed from ComputeJointLocalTransforms(). If atRest
is true, any bound animation source is ignored, and transforms are computed from the rest pose. The skeleton-space transforms of the rest pose are cached internally.
USDSKEL_API bool ComputeJointWorldTransforms | ( | VtArray< Matrix4 > * | xforms, |
UsdGeomXformCache * | xfCache, | ||
bool | atRest = false |
||
) | const |
Compute joint transforms in world space, at whatever time is configured on xfCache
.
This is equivalent to computing skel-space joint transforms with CmoputeJointSkelTransforms(), and then concatenating all transforms by the local-to-world transform of the Skeleton prim. If atRest
is true, any bound animation source is ignored, and transforms are computed from the rest pose.
USDSKEL_API bool ComputeSkinningTransforms | ( | VtArray< Matrix4 > * | xforms, |
UsdTimeCode | time | ||
) | const |
Compute transforms representing the change in transformation of a joint from its rest pose, in skeleton space.
I.e.,
These are the transforms usually required for skinning.
USDSKEL_API const UsdSkelAnimQuery & GetAnimQuery | ( | ) | const |
Returns the animation query that provides animation for the bound skeleton instance, if any.
USDSKEL_API VtTokenArray GetJointOrder | ( | ) | const |
Returns an array of joint paths, given as tokens, describing the order and parent-child relationships of joints in the skeleton.
USDSKEL_API bool GetJointWorldBindTransforms | ( | VtArray< Matrix4 > * | xforms | ) | const |
Returns the world space joint transforms at bind time.
USDSKEL_API const UsdSkelAnimMapper & GetMapper | ( | ) | const |
Returns a mapper for remapping from the bound animation, if any, to the Skeleton.
USDSKEL_API UsdPrim GetPrim | ( | ) | const |
Returns the underlying Skeleton primitive corresponding to the bound skeleton instance, if any.
USDSKEL_API const UsdSkelSkeleton & GetSkeleton | ( | ) | const |
Returns the bound skeleton instance, if any.
USDSKEL_API const UsdSkelTopology & GetTopology | ( | ) | const |
Returns the topology of the bound skeleton instance, if any.
USDSKEL_API bool HasBindPose | ( | ) | const |
Returns true
if the size of the array returned by skeleton::GetBindTransformsAttr() matches the number of joints in the skeleton.
USDSKEL_API bool HasRestPose | ( | ) | const |
Returns true
if the size of the array returned by skeleton::GetRestTransformsAttr() matches the number of joints in the skeleton.
|
inline |
Return true if this query is valid.
Definition at line 59 of file skeletonQuery.h.
|
inlineexplicit |
Boolean conversion operator. Equivalent to IsValid().
Definition at line 62 of file skeletonQuery.h.
|
friend |
Inequality comparison.
Return false if lhs and rhs represent the same UsdSkelSkeletonQuery, true otherwise.
Definition at line 74 of file skeletonQuery.h.
|
friend |
Equality comparison.
Return true if lhs and rhs represent the same UsdSkelSkeletonQuery, false otherwise.
Definition at line 66 of file skeletonQuery.h.
|
friend |
Definition at line 221 of file skeletonQuery.h.