UsdSkelSkinningQuery Class Reference

Object used for querying resolved bindings for skinning. More...

Public Member Functions

USDSKEL_API UsdSkelSkinningQuery (const UsdPrim &prim, const VtTokenArray &skelJointOrder, const VtTokenArray &blendShapeOrder, const UsdAttribute &jointIndices, const UsdAttribute &jointWeights, 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. More...
 
bool IsValid () const
 Returns true if this query is valid. More...
 
 operator bool () const
 Boolean conversion operator. Equivalent to IsValid(). More...
 
const UsdPrimGetPrim () const
 
USDSKEL_API bool HasBlendShapes () const
 Returns true if there are blend shapes associated with this prim. More...
 
USDSKEL_API bool HasJointInfluences () const
 Returns true if joint influence data is associated with this prim. More...
 
int GetNumInfluencesPerComponent () const
 Returns the number of influences encoded for each component. More...
 
const TfTokenGetInterpolation () const
 
USDSKEL_API bool IsRigidlyDeformed () const
 Returns true if the held prim has the same joint influences across all points, or false otherwise. More...
 
const UsdAttributeGetGeomBindTransformAttr () const
 
const UsdGeomPrimvarGetJointIndicesPrimvar () const
 
const UsdGeomPrimvarGetJointWeightsPrimvar () const
 
const UsdAttributeGetBlendShapesAttr () const
 
const UsdRelationshipGetBlendShapeTargetsRel () 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. More...
 
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. More...
 
USDSKEL_API bool GetJointOrder (VtTokenArray *jointOrder) const
 Get the custom joint order for this skinning site, if any. More...
 
USDSKEL_API bool GetBlendShapeOrder (VtTokenArray *blendShapes) const
 Get the blend shapes for this skinning site, if any. More...
 
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). More...
 
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. More...
 
USDSKEL_API bool ComputeJointInfluences (VtIntArray *indices, VtFloatArray *weights, UsdTimeCode time=UsdTimeCode::Default()) const
 Convenience method for computing joint influences. More...
 
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. More...
 
template<typename Matrix4 >
USDSKEL_API bool ComputeSkinnedPoints (const VtArray< Matrix4 > &xforms, VtVec3fArray *points, UsdTimeCode time=UsdTimeCode::Default()) const
 Compute skinned points using linear blend skinning. More...
 
template<typename Matrix4 >
USDSKEL_API bool ComputeSkinnedNormals (const VtArray< Matrix4 > &xforms, VtVec3fArray *points, UsdTimeCode time=UsdTimeCode::Default()) const
 Compute skinned normals using linear blend skinning. More...
 
template<typename Matrix4 >
USDSKEL_API bool ComputeSkinnedTransform (const VtArray< Matrix4 > &xforms, Matrix4 *xform, UsdTimeCode time=UsdTimeCode::Default()) const
 Compute a skinning transform using linear blend skinning. More...
 
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. More...
 
USDSKEL_API GfMatrix4d GetGeomBindTransform (UsdTimeCode time=UsdTimeCode::Default()) const
 
USDSKEL_API std::string GetDescription () const
 

Detailed Description

Object used for querying resolved bindings for skinning.

Definition at line 50 of file skinningQuery.h.

Constructor & Destructor Documentation

◆ UsdSkelSkinningQuery()

USDSKEL_API UsdSkelSkinningQuery ( const UsdPrim prim,
const VtTokenArray &  skelJointOrder,
const VtTokenArray &  blendShapeOrder,
const UsdAttribute jointIndices,
const UsdAttribute jointWeights,
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.

Member Function Documentation

◆ ComputeExtentsPadding()

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 skelRestXformsskeleton 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.

◆ ComputeJointInfluences()

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.

◆ ComputeSkinnedNormals()

USDSKEL_API bool ComputeSkinnedNormals ( const VtArray< Matrix4 > &  xforms,
VtVec3fArray *  points,
UsdTimeCode  time = UsdTimeCode::Default() 
) const

Compute skinned normals using linear blend skinning.

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).

See also
UsdSkelSkeletonQuery::ComputeSkinningTransforms

◆ ComputeSkinnedPoints()

USDSKEL_API bool ComputeSkinnedPoints ( const VtArray< Matrix4 > &  xforms,
VtVec3fArray *  points,
UsdTimeCode  time = UsdTimeCode::Default() 
) const

Compute skinned points using linear blend skinning.

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).

See also
UsdSkelSkeletonQuery::ComputeSkinningTransforms

◆ ComputeSkinnedTransform()

USDSKEL_API bool ComputeSkinnedTransform ( const VtArray< Matrix4 > &  xforms,
Matrix4 *  xform,
UsdTimeCode  time = UsdTimeCode::Default() 
) const

Compute a skinning transform using linear blend skinning.

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.

See also
UsdSkelSkeletonQuery::ComputeSkinningTransforms

◆ ComputeVaryingJointInfluences()

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.

◆ GetBlendShapeMapper()

const UsdSkelAnimMapperRefPtr& GetBlendShapeMapper ( ) const
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 143 of file skinningQuery.h.

◆ GetBlendShapeOrder()

USDSKEL_API bool GetBlendShapeOrder ( VtTokenArray *  blendShapes) const

Get the blend shapes for this skinning site, if any.

◆ GetJointMapper()

const UsdSkelAnimMapperRefPtr& GetJointMapper ( ) const
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 129 of file skinningQuery.h.

◆ GetJointOrder()

USDSKEL_API bool GetJointOrder ( VtTokenArray *  jointOrder) const

Get the custom joint order for this skinning site, if any.

◆ GetMapper()

const UsdSkelAnimMapperRefPtr& GetMapper ( ) const
inline
Deprecated:
Use GetJointMapper.

Definition at line 134 of file skinningQuery.h.

◆ GetNumInfluencesPerComponent()

int GetNumInfluencesPerComponent ( ) const
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.

See also
IsRigidlyDeformed

Definition at line 92 of file skinningQuery.h.

◆ GetTimeSamples()

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).

See also
UsdAttribute::GetTimeSamples

◆ GetTimeSamplesInInterval()

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).

See also
UsdAttribute::GetTimeSamplesInInterval

◆ HasBlendShapes()

USDSKEL_API bool HasBlendShapes ( ) const

Returns true if there are blend shapes associated with this prim.

◆ HasJointInfluences()

USDSKEL_API bool HasJointInfluences ( ) const

Returns true if joint influence data is associated with this prim.

◆ IsRigidlyDeformed()

USDSKEL_API bool IsRigidlyDeformed ( ) const

Returns true if the held prim has the same joint influences across all points, or false otherwise.

◆ IsValid()

bool IsValid ( ) const
inline

Returns true if this query is valid.

Definition at line 72 of file skinningQuery.h.

◆ operator bool()

operator bool ( ) const
inlineexplicit

Boolean conversion operator. Equivalent to IsValid().

Definition at line 75 of file skinningQuery.h.


The documentation for this class was generated from the following file: