All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Joint Influence Utils

Collection of methods for working joint influences, as stored through UsdSkelBindingAPI. More...

+ Collaboration diagram for Joint Influence Utils:

Functions

USDSKEL_API bool UsdSkelNormalizeWeights (TfSpan< float > weights, int numInfluencesPerComponent)
 Helper method to normalize weight values across each consecutive run of numInfluencesPerComponent elements. More...
 
USDSKEL_API bool UsdSkelNormalizeWeights (VtFloatArray *weights, int numInfluencesPerComponent)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
USDSKEL_API bool UsdSkelSortInfluences (TfSpan< int > indices, TfSpan< float > weights, int numInfluencesPerComponent)
 Sort joint influences such that highest weight values come first. More...
 
USDSKEL_API bool UsdSkelSortInfluences (VtIntArray *indices, VtFloatArray *weights, int numInfluencesPerComponent)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
USDSKEL_API bool UsdSkelExpandConstantInfluencesToVarying (VtIntArray *indices, size_t size)
 Convert an array of constant influences (joint weights or indices) to an array of varying influences. More...
 
USDSKEL_API bool UsdSkelExpandConstantInfluencesToVarying (VtFloatArray *weights, size_t size)
 
USDSKEL_API bool UsdSkelResizeInfluences (VtIntArray *indices, int srcNumInfluencesPerComponent, int newNumInfluencesPerComponent)
 Resize the number of influences per component in a weight or indices array, which initially has srcNumInfluencesPerComponent influences to have no more than newNumInfluencesPerComponent influences per component. More...
 
USDSKEL_API bool UsdSkelResizeInfluences (VtFloatArray *weights, int srcNumInfluencesPerComponent, int newNumInfluencesPerComponent)
 
USDSKEL_API bool UsdSkelInterleaveInfluences (const TfSpan< const int > &indices, const TfSpan< const float > &weights, TfSpan< GfVec2f > interleavedInfluences)
 Combine arrays of joint indices and weights into interleaved (index,weight) vectors. More...
 

Detailed Description

Collection of methods for working joint influences, as stored through UsdSkelBindingAPI.

`

Function Documentation

USDSKEL_API bool UsdSkelExpandConstantInfluencesToVarying ( VtIntArray *  indices,
size_t  size 
)

Convert an array of constant influences (joint weights or indices) to an array of varying influences.

The size should match the size of required for 'vertex' interpolation on the type geometry primitive. Typically, this is the number of points. This is a convenience function for clients that don't understand constant (rigid) weighting.

USDSKEL_API bool UsdSkelExpandConstantInfluencesToVarying ( VtFloatArray *  weights,
size_t  size 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

USDSKEL_API bool UsdSkelInterleaveInfluences ( const TfSpan< const int > &  indices,
const TfSpan< const float > &  weights,
TfSpan< GfVec2f interleavedInfluences 
)

Combine arrays of joint indices and weights into interleaved (index,weight) vectors.

USDSKEL_API bool UsdSkelNormalizeWeights ( TfSpan< float >  weights,
int  numInfluencesPerComponent 
)

Helper method to normalize weight values across each consecutive run of numInfluencesPerComponent elements.

USDSKEL_API bool UsdSkelNormalizeWeights ( VtFloatArray *  weights,
int  numInfluencesPerComponent 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Deprecated:
Use form that takes a TfSpan.
USDSKEL_API bool UsdSkelResizeInfluences ( VtIntArray *  indices,
int  srcNumInfluencesPerComponent,
int  newNumInfluencesPerComponent 
)

Resize the number of influences per component in a weight or indices array, which initially has srcNumInfluencesPerComponent influences to have no more than newNumInfluencesPerComponent influences per component.

If the size decreases, influences are additionally re-normalized. This is a convenience method for clients that require a fixed number of of influences.

USDSKEL_API bool UsdSkelResizeInfluences ( VtFloatArray *  weights,
int  srcNumInfluencesPerComponent,
int  newNumInfluencesPerComponent 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

USDSKEL_API bool UsdSkelSortInfluences ( TfSpan< int >  indices,
TfSpan< float >  weights,
int  numInfluencesPerComponent 
)

Sort joint influences such that highest weight values come first.

USDSKEL_API bool UsdSkelSortInfluences ( VtIntArray *  indices,
VtFloatArray *  weights,
int  numInfluencesPerComponent 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Deprecated:
Use form that takes TfSpan arguments.