HDK
|
#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 UsdPrim & | GetPrim () 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 TfToken & | GetInterpolation () const |
USDSKEL_API bool | IsRigidlyDeformed () const |
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 |
const UsdSkelAnimMapperRefPtr & | GetMapper () const |
const UsdSkelAnimMapperRefPtr & | GetBlendShapeMapper () 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 |
Object used for querying resolved bindings for skinning.
Definition at line 51 of file skinningQuery.h.
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.
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 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 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.
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).
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).
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.
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.
|
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.
|
inline |
Definition at line 121 of file skinningQuery.h.
|
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 |
|
inline |
Definition at line 109 of file skinningQuery.h.
|
inline |
Definition at line 98 of file skinningQuery.h.
|
inline |
Definition at line 113 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 135 of file skinningQuery.h.
USDSKEL_API bool UsdSkelSkinningQuery::GetJointOrder | ( | VtTokenArray * | jointOrder | ) | const |
Get the custom joint order for this skinning site, if any.
|
inline |
Definition at line 117 of file skinningQuery.h.
|
inline |
Definition at line 140 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 94 of file skinningQuery.h.
|
inline |
Definition at line 79 of file skinningQuery.h.
USDSKEL_API TfToken UsdSkelSkinningQuery::GetSkinningMethod | ( | ) | 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).
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).
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.
|
inline |
Returns true if this query is valid.
Definition at line 74 of file skinningQuery.h.
|
inlineexplicit |
Boolean conversion operator. Equivalent to IsValid().
Definition at line 77 of file skinningQuery.h.