|
Object used for querying resolved bindings for skinning. More...
#include <skinningQuery.h>
Public Member Functions | |
USDSKEL_API | UsdSkelSkinningQuery (const UsdPrim &prim, const VtTokenArray &skelJointOrder, const VtTokenArray &blendShapeOrder, const UsdAttribute &jointIndices, const UsdAttribute &jointWeights, const UsdAttribute &skinningMethod, const UsdAttribute &geomBindTransform, const UsdAttribute &joints, const UsdAttribute &blendShapes, const UsdRelationship &blendShapeTargets) |
Construct a new skining query for the resolved properties set through the UsdSkelBindingAPI, as inherited on prim . | |
bool | IsValid () const |
Returns true if this query is valid. | |
operator bool () const | |
Boolean conversion operator. Equivalent to IsValid(). | |
const UsdPrim & | GetPrim () const |
USDSKEL_API bool | HasBlendShapes () const |
Returns true if there are blend shapes associated with this prim. | |
USDSKEL_API bool | HasJointInfluences () const |
Returns true if joint influence data is associated with this prim. | |
int | GetNumInfluencesPerComponent () const |
Returns the number of influences encoded for each component. | |
const TfToken & | GetInterpolation () const |
USDSKEL_API bool | IsRigidlyDeformed () const |
Returns true if the held prim has the same joint influences across all points, or false otherwise. | |
const UsdAttribute & | GetSkinningMethodAttr () const |
const UsdAttribute & | GetGeomBindTransformAttr () const |
const UsdGeomPrimvar & | GetJointIndicesPrimvar () const |
const UsdGeomPrimvar & | GetJointWeightsPrimvar () const |
const UsdAttribute & | GetBlendShapesAttr () const |
const UsdRelationship & | GetBlendShapeTargetsRel () const |
const UsdSkelAnimMapperRefPtr & | GetJointMapper () const |
Return a mapper for remapping from the joint order of the skeleton to the local joint order of this prim, if any. | |
const UsdSkelAnimMapperRefPtr & | GetMapper () const |
const UsdSkelAnimMapperRefPtr & | GetBlendShapeMapper () const |
Return the mapper for remapping blend shapes from the order of the bound SkelAnimation to the local blend shape order of this prim. | |
USDSKEL_API bool | GetJointOrder (VtTokenArray *jointOrder) const |
Get the custom joint order for this skinning site, if any. | |
USDSKEL_API bool | GetBlendShapeOrder (VtTokenArray *blendShapes) const |
Get the blend shapes for this skinning site, if any. | |
USDSKEL_API bool | GetTimeSamples (std::vector< double > *times) const |
Populate times with the union of time samples for all properties that affect skinning, independent of joint transforms and any other prim-specific properties (such as points). | |
USDSKEL_API bool | GetTimeSamplesInInterval (const GfInterval &interval, std::vector< double > *times) const |
Populate times with the union of time samples within interval , for all properties that affect skinning, independent of joint transforms and any other prim-specific properties (such as points). | |
USDSKEL_API bool | ComputeJointInfluences (VtIntArray *indices, VtFloatArray *weights, UsdTimeCode time=UsdTimeCode::Default()) const |
Convenience method for computing joint influences. | |
USDSKEL_API bool | ComputeVaryingJointInfluences (size_t numPoints, VtIntArray *indices, VtFloatArray *weights, UsdTimeCode time=UsdTimeCode::Default()) const |
Convenience method for computing joint influence, where constant influences are expanded to hold values per point. | |
template<typename Matrix4 > | |
USDSKEL_API bool | ComputeSkinnedPoints (const VtArray< Matrix4 > &xforms, VtVec3fArray *points, UsdTimeCode time=UsdTimeCode::Default()) const |
Compute skinned points using specified skinning method attr (fallback to linear blend skinning if not specified) Both xforms and points are given in skeleton space, using the joint order of the bound skeleton. | |
template<typename Matrix4 > | |
USDSKEL_API bool | ComputeSkinnedNormals (const VtArray< Matrix4 > &xforms, VtVec3fArray *points, UsdTimeCode time=UsdTimeCode::Default()) const |
Compute skinned normals using specified skinning method attr (fallback to linear blend skinning if not specified) Both xforms and points are given in skeleton space, using the joint order of the bound skeleton. | |
template<typename Matrix4 > | |
USDSKEL_API bool | ComputeSkinnedTransform (const VtArray< Matrix4 > &xforms, Matrix4 *xform, UsdTimeCode time=UsdTimeCode::Default()) const |
Compute a skinning transform using specified skinning method attr (fallback to linear blend skinning if not specified) The xforms are given in skeleton space, using the joint order of the bound skeleton. | |
template<typename Matrix4 > | |
USDSKEL_API float | ComputeExtentsPadding (const VtArray< Matrix4 > &skelRestXforms, const UsdGeomBoundable &boundable) const |
Helper for computing an approximate padding for use in extents computations. | |
USDSKEL_API TfToken | GetSkinningMethod () const |
USDSKEL_API GfMatrix4d | GetGeomBindTransform (UsdTimeCode time=UsdTimeCode::Default()) const |
USDSKEL_API std::string | GetDescription () const |
Object used for querying resolved bindings for skinning.
Definition at line 34 of file skinningQuery.h.
USDSKEL_API UsdSkelSkinningQuery | ( | const UsdPrim & | prim, |
const VtTokenArray & | skelJointOrder, | ||
const VtTokenArray & | blendShapeOrder, | ||
const UsdAttribute & | jointIndices, | ||
const UsdAttribute & | jointWeights, | ||
const UsdAttribute & | skinningMethod, | ||
const UsdAttribute & | geomBindTransform, | ||
const UsdAttribute & | joints, | ||
const UsdAttribute & | blendShapes, | ||
const UsdRelationship & | blendShapeTargets | ||
) |
Construct a new skining query for the resolved properties set through the UsdSkelBindingAPI, as inherited on prim
.
The resulting query will be marked valid only if the inherited properties provide proper valid joint influences.
USDSKEL_API float ComputeExtentsPadding | ( | const VtArray< Matrix4 > & | skelRestXforms, |
const UsdGeomBoundable & | boundable | ||
) | const |
Helper for computing an approximate padding for use in extents computations.
The padding is computed as the difference between the pivots of the skelRestXforms
– skeleton space joint transforms at rest – and the extents of the skinned primitive. This is intended to provide a suitable, constant metric for padding joint extents as computed by UsdSkelComputeJointsExtent.
USDSKEL_API bool ComputeJointInfluences | ( | VtIntArray * | indices, |
VtFloatArray * | weights, | ||
UsdTimeCode | time = UsdTimeCode::Default() |
||
) | const |
Convenience method for computing joint influences.
In addition to querying influences, this will also perform validation of the basic form of the weight data – although the array contents is not validated.
USDSKEL_API bool ComputeSkinnedNormals | ( | const VtArray< Matrix4 > & | xforms, |
VtVec3fArray * | points, | ||
UsdTimeCode | time = UsdTimeCode::Default() |
||
) | const |
Compute skinned normals using specified skinning method attr (fallback to linear blend skinning if not specified) Both xforms
and points
are given in skeleton space, using the joint order of the bound skeleton.
Joint influences and the (optional) binding transform are computed at time time
(which will typically be unvarying).
USDSKEL_API bool ComputeSkinnedPoints | ( | const VtArray< Matrix4 > & | xforms, |
VtVec3fArray * | points, | ||
UsdTimeCode | time = UsdTimeCode::Default() |
||
) | const |
Compute skinned points using specified skinning method attr (fallback to linear blend skinning if not specified) Both xforms
and points
are given in skeleton space, using the joint order of the bound skeleton.
Joint influences and the (optional) binding transform are computed at time time
(which will typically be unvarying).
USDSKEL_API bool ComputeSkinnedTransform | ( | const VtArray< Matrix4 > & | xforms, |
Matrix4 * | xform, | ||
UsdTimeCode | time = UsdTimeCode::Default() |
||
) | const |
Compute a skinning transform using specified skinning method attr (fallback to linear blend skinning if not specified) The xforms
are given in skeleton space, using the joint order of the bound skeleton.
Joint influences and the (optional) binding transform are computed at time time
(which will typically be unvarying). If this skinning query holds non-constant joint influences, no transform will be computed, and the function will return false.
USDSKEL_API bool ComputeVaryingJointInfluences | ( | size_t | numPoints, |
VtIntArray * | indices, | ||
VtFloatArray * | weights, | ||
UsdTimeCode | time = UsdTimeCode::Default() |
||
) | const |
Convenience method for computing joint influence, where constant influences are expanded to hold values per point.
In addition to querying influences, this will also perform validation of the basic form of the weight data – although the array contents is not validated.
|
inline |
Return the mapper for remapping blend shapes from the order of the bound SkelAnimation to the local blend shape order of this prim.
Returns a null reference if the underlying prim has no blend shapes. The mapper maps data from the order given by the blendShapes order on the SkelAnimation to the order given by the skel:blendShapes property, as set through the UsdSkelBindingAPI.
Definition at line 132 of file skinningQuery.h.
USDSKEL_API bool GetBlendShapeOrder | ( | VtTokenArray * | blendShapes | ) | const |
Get the blend shapes for this skinning site, if any.
|
inline |
Definition at line 104 of file skinningQuery.h.
|
inline |
Definition at line 108 of file skinningQuery.h.
|
inline |
Definition at line 92 of file skinningQuery.h.
|
inline |
Definition at line 81 of file skinningQuery.h.
|
inline |
Definition at line 96 of file skinningQuery.h.
|
inline |
Return a mapper for remapping from the joint order of the skeleton to the local joint order of this prim, if any.
Returns a null pointer if the prim has no custom joint orer. The mapper maps data from the order given by the joints order on the Skeleton to the order given by the skel:joints property, as optionally set through the UsdSkelBindingAPI.
Definition at line 118 of file skinningQuery.h.
USDSKEL_API bool GetJointOrder | ( | VtTokenArray * | jointOrder | ) | const |
Get the custom joint order for this skinning site, if any.
|
inline |
Definition at line 100 of file skinningQuery.h.
|
inline |
Definition at line 123 of file skinningQuery.h.
|
inline |
Returns the number of influences encoded for each component.
If the prim defines rigid joint influences, then this returns the number of influences that map to every point. Otherwise, this provides the number of influences per point.
Definition at line 77 of file skinningQuery.h.
|
inline |
Definition at line 62 of file skinningQuery.h.
|
inline |
Definition at line 88 of file skinningQuery.h.
USDSKEL_API bool GetTimeSamples | ( | std::vector< double > * | times | ) | const |
Populate times
with the union of time samples for all properties that affect skinning, independent of joint transforms and any other prim-specific properties (such as points).
USDSKEL_API bool GetTimeSamplesInInterval | ( | const GfInterval & | interval, |
std::vector< double > * | times | ||
) | const |
Populate times
with the union of time samples within interval
, for all properties that affect skinning, independent of joint
transforms and any other prim-specific properties (such as points).
USDSKEL_API bool HasBlendShapes | ( | ) | const |
Returns true if there are blend shapes associated with this prim.
USDSKEL_API bool HasJointInfluences | ( | ) | const |
Returns true if joint influence data is associated with this prim.
USDSKEL_API bool IsRigidlyDeformed | ( | ) | const |
Returns true if the held prim has the same joint influences across all points, or false otherwise.
|
inline |
Returns true if this query is valid.
Definition at line 57 of file skinningQuery.h.
|
inlineexplicit |
Boolean conversion operator. Equivalent to IsValid().
Definition at line 60 of file skinningQuery.h.