HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdSkelSkinningQuery Class Reference

#include <skinningQuery.h>

Public Member Functions

USDSKEL_API UsdSkelSkinningQuery ()
 
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)
 
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
 
const TfTokenGetInterpolation () const
 
USDSKEL_API bool IsRigidlyDeformed () const
 
const UsdAttributeGetSkinningMethodAttr () const
 
const UsdAttributeGetGeomBindTransformAttr () const
 
const UsdGeomPrimvarGetJointIndicesPrimvar () const
 
const UsdGeomPrimvarGetJointWeightsPrimvar () const
 
const UsdAttributeGetBlendShapesAttr () const
 
const UsdRelationshipGetBlendShapeTargetsRel () const
 
const UsdSkelAnimMapperRefPtrGetJointMapper () const
 
const UsdSkelAnimMapperRefPtrGetMapper () const
 
const UsdSkelAnimMapperRefPtrGetBlendShapeMapper () const
 
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
 
USDSKEL_API bool GetTimeSamplesInInterval (const GfInterval &interval, std::vector< double > *times) const
 
USDSKEL_API bool ComputeJointInfluences (VtIntArray *indices, VtFloatArray *weights, UsdTimeCode time=UsdTimeCode::Default()) const
 
USDSKEL_API bool ComputeVaryingJointInfluences (size_t numPoints, VtIntArray *indices, VtFloatArray *weights, UsdTimeCode time=UsdTimeCode::Default()) const
 
template<typename Matrix4 >
USDSKEL_API bool ComputeSkinnedPoints (const VtArray< Matrix4 > &xforms, VtVec3fArray *points, UsdTimeCode time=UsdTimeCode::Default()) const
 
template<typename Matrix4 >
USDSKEL_API bool ComputeSkinnedNormals (const VtArray< Matrix4 > &xforms, VtVec3fArray *points, UsdTimeCode time=UsdTimeCode::Default()) const
 
template<typename Matrix4 >
USDSKEL_API bool ComputeSkinnedTransform (const VtArray< Matrix4 > &xforms, Matrix4 *xform, UsdTimeCode time=UsdTimeCode::Default()) const
 
template<typename Matrix4 >
USDSKEL_API float ComputeExtentsPadding (const VtArray< Matrix4 > &skelRestXforms, const UsdGeomBoundable &boundable) const
 
USDSKEL_API TfToken GetSkinningMethod () const
 
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 51 of file skinningQuery.h.

Constructor & Destructor Documentation

USDSKEL_API UsdSkelSkinningQuery::UsdSkelSkinningQuery ( )
USDSKEL_API UsdSkelSkinningQuery::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.

Member Function Documentation

template<typename Matrix4 >
USDSKEL_API float UsdSkelSkinningQuery::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.

USDSKEL_API bool UsdSkelSkinningQuery::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.

template<typename Matrix4 >
USDSKEL_API bool UsdSkelSkinningQuery::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).

See Also
UsdSkelSkeletonQuery::ComputeSkinningTransforms
template<typename Matrix4 >
USDSKEL_API bool UsdSkelSkinningQuery::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).

See Also
UsdSkelSkeletonQuery::ComputeSkinningTransforms
template<typename Matrix4 >
USDSKEL_API bool UsdSkelSkinningQuery::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.

See Also
UsdSkelSkeletonQuery::ComputeSkinningTransforms
USDSKEL_API bool UsdSkelSkinningQuery::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.

const UsdSkelAnimMapperRefPtr& UsdSkelSkinningQuery::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 149 of file skinningQuery.h.

USDSKEL_API bool UsdSkelSkinningQuery::GetBlendShapeOrder ( VtTokenArray *  blendShapes) const

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

const UsdAttribute& UsdSkelSkinningQuery::GetBlendShapesAttr ( ) const
inline

Definition at line 121 of file skinningQuery.h.

const UsdRelationship& UsdSkelSkinningQuery::GetBlendShapeTargetsRel ( ) const
inline

Definition at line 125 of file skinningQuery.h.

USDSKEL_API std::string UsdSkelSkinningQuery::GetDescription ( ) const
USDSKEL_API GfMatrix4d UsdSkelSkinningQuery::GetGeomBindTransform ( UsdTimeCode  time = UsdTimeCode::Default()) const
const UsdAttribute& UsdSkelSkinningQuery::GetGeomBindTransformAttr ( ) const
inline

Definition at line 109 of file skinningQuery.h.

const TfToken& UsdSkelSkinningQuery::GetInterpolation ( ) const
inline

Definition at line 98 of file skinningQuery.h.

const UsdGeomPrimvar& UsdSkelSkinningQuery::GetJointIndicesPrimvar ( ) const
inline

Definition at line 113 of file skinningQuery.h.

const UsdSkelAnimMapperRefPtr& UsdSkelSkinningQuery::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 135 of file skinningQuery.h.

USDSKEL_API bool UsdSkelSkinningQuery::GetJointOrder ( VtTokenArray *  jointOrder) const

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

const UsdGeomPrimvar& UsdSkelSkinningQuery::GetJointWeightsPrimvar ( ) const
inline

Definition at line 117 of file skinningQuery.h.

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

Definition at line 140 of file skinningQuery.h.

int UsdSkelSkinningQuery::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 94 of file skinningQuery.h.

const UsdPrim& UsdSkelSkinningQuery::GetPrim ( ) const
inline

Definition at line 79 of file skinningQuery.h.

USDSKEL_API TfToken UsdSkelSkinningQuery::GetSkinningMethod ( ) const
const UsdAttribute& UsdSkelSkinningQuery::GetSkinningMethodAttr ( ) const
inline

Definition at line 105 of file skinningQuery.h.

USDSKEL_API bool UsdSkelSkinningQuery::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
USDSKEL_API bool UsdSkelSkinningQuery::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
USDSKEL_API bool UsdSkelSkinningQuery::HasBlendShapes ( ) const

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

USDSKEL_API bool UsdSkelSkinningQuery::HasJointInfluences ( ) const

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

USDSKEL_API bool UsdSkelSkinningQuery::IsRigidlyDeformed ( ) const

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

bool UsdSkelSkinningQuery::IsValid ( ) const
inline

Returns true if this query is valid.

Definition at line 74 of file skinningQuery.h.

UsdSkelSkinningQuery::operator bool ( ) const
inlineexplicit

Boolean conversion operator. Equivalent to IsValid().

Definition at line 77 of file skinningQuery.h.


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