HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
utils.h File Reference
#include "pxr/pxr.h"
#include "pxr/usd/usdSkel/api.h"
#include "pxr/base/gf/quatf.h"
#include "pxr/base/gf/matrix3d.h"
#include "pxr/base/gf/matrix3f.h"
#include "pxr/base/gf/matrix4d.h"
#include "pxr/base/gf/matrix4f.h"
#include "pxr/base/gf/vec3h.h"
#include "pxr/base/tf/span.h"
#include "pxr/base/vt/array.h"
#include "pxr/base/vt/types.h"
#include "pxr/usd/sdf/path.h"
#include <cstddef>
#include "pxr/usd/usdSkel/bakeSkinning.h"
+ Include dependency graph for utils.h:

Go to the source code of this file.

Functions

USDSKEL_API bool UsdSkelIsSkelAnimationPrim (const UsdPrim &prim)
 Returns true if prim is a valid skel animation source. More...
 
USDSKEL_API bool UsdSkelIsSkinnablePrim (const UsdPrim &prim)
 
USDSKEL_API bool UsdSkelComputeJointLocalTransforms (const UsdSkelTopology &topology, TfSpan< const GfMatrix4d > xforms, TfSpan< const GfMatrix4d > inverseXforms, TfSpan< GfMatrix4d > jointLocalXforms, const GfMatrix4d *rootInverseXform=nullptr)
 
USDSKEL_API bool UsdSkelComputeJointLocalTransforms (const UsdSkelTopology &topology, TfSpan< const GfMatrix4f > xforms, TfSpan< const GfMatrix4f > inverseXforms, TfSpan< GfMatrix4f > jointLocalXforms, const GfMatrix4f *rootInverseXform=nullptr)
 
USDSKEL_API bool UsdSkelComputeJointLocalTransforms (const UsdSkelTopology &topology, TfSpan< const GfMatrix4d > xforms, TfSpan< GfMatrix4d > jointLocalXforms, const GfMatrix4d *rootInverseXform=nullptr)
 
USDSKEL_API bool UsdSkelComputeJointLocalTransforms (const UsdSkelTopology &topology, TfSpan< const GfMatrix4f > xforms, TfSpan< GfMatrix4f > jointLocalXforms, const GfMatrix4f *rootInverseXform=nullptr)
 
USDSKEL_API bool UsdSkelComputeJointLocalTransforms (const UsdSkelTopology &topology, const VtMatrix4dArray &xforms, const VtMatrix4dArray &inverseXforms, VtMatrix4dArray *jointLocalXforms, const GfMatrix4d *rootInverseXform=nullptr)
 
USDSKEL_API bool UsdSkelComputeJointLocalTransforms (const UsdSkelTopology &topology, const VtMatrix4dArray &xforms, VtMatrix4dArray *jointLocalXforms, const GfMatrix4d *rootInverseXform=nullptr)
 
USDSKEL_API bool UsdSkelComputeJointLocalTransforms (const UsdSkelTopology &topology, const GfMatrix4d *xforms, const GfMatrix4d *inverseXforms, GfMatrix4d *jointLocalXforms, const GfMatrix4d *rootInverseXform=nullptr)
 
USDSKEL_API bool UsdSkelConcatJointTransforms (const UsdSkelTopology &topology, TfSpan< const GfMatrix4d > jointLocalXforms, TfSpan< GfMatrix4d > xforms, const GfMatrix4d *rootXform=nullptr)
 
USDSKEL_API bool UsdSkelConcatJointTransforms (const UsdSkelTopology &topology, TfSpan< const GfMatrix4f > jointLocalXforms, TfSpan< GfMatrix4f > xforms, const GfMatrix4f *rootXform=nullptr)
 
USDSKEL_API bool UsdSkelConcatJointTransforms (const UsdSkelTopology &topology, const VtMatrix4dArray &jointLocalXforms, VtMatrix4dArray *xforms, const GfMatrix4d *rootXform=nullptr)
 
USDSKEL_API bool UsdSkelConcatJointTransforms (const UsdSkelTopology &topology, const GfMatrix4d *jointLocalXforms, GfMatrix4d *xforms, const GfMatrix4d *rootXform=nullptr)
 
template<typename Matrix4 >
USDSKEL_API bool UsdSkelComputeJointsExtent (TfSpan< const Matrix4 > joints, GfRange3f *extent, float pad=0.0f, const Matrix4 *rootXform=nullptr)
 
USDSKEL_API bool UsdSkelComputeJointsExtent (const VtMatrix4dArray &joints, VtVec3fArray *extent, float pad=0.0f, const GfMatrix4d *rootXform=nullptr)
 
USDSKEL_API bool UsdSkelComputeJointsExtent (const GfMatrix4d *xforms, size_t numXforms, VtVec3fArray *extent, float pad=0.0f, const GfMatrix4d *rootXform=nullptr)
 
template<typename Matrix4 >
USDSKEL_API bool UsdSkelDecomposeTransform (const Matrix4 &xform, GfVec3f *translate, GfRotation *rotate, GfVec3h *scale)
 
template<typename Matrix4 >
USDSKEL_API bool UsdSkelDecomposeTransform (const Matrix4 &xform, GfVec3f *translate, GfQuatf *rotate, GfVec3h *scale)
 
USDSKEL_API bool UsdSkelDecomposeTransforms (TfSpan< const GfMatrix4d > xforms, TfSpan< GfVec3f > translations, TfSpan< GfQuatf > rotations, TfSpan< GfVec3h > scales)
 
USDSKEL_API bool UsdSkelDecomposeTransforms (TfSpan< const GfMatrix4f > xforms, TfSpan< GfVec3f > translations, TfSpan< GfQuatf > rotations, TfSpan< GfVec3h > scales)
 
USDSKEL_API bool UsdSkelDecomposeTransforms (const VtMatrix4dArray &xforms, VtVec3fArray *translations, VtQuatfArray *rotations, VtVec3hArray *scales)
 
USDSKEL_API bool UsdSkelDecomposeTransforms (const GfMatrix4d *xforms, GfVec3f *translations, GfQuatf *rotations, GfVec3h *scales, size_t count)
 
template<typename Matrix4 >
USDSKEL_API void UsdSkelMakeTransform (const GfVec3f &translate, const GfMatrix3f &rotate, const GfVec3h &scale, Matrix4 *xform)
 
template<typename Matrix4 >
USDSKEL_API void UsdSkelMakeTransform (const GfVec3f &translate, const GfQuatf &rotate, const GfVec3h &scale, Matrix4 *xform)
 
USDSKEL_API bool UsdSkelMakeTransforms (TfSpan< const GfVec3f > translations, TfSpan< const GfQuatf > rotations, TfSpan< const GfVec3h > scales, TfSpan< GfMatrix4d > xforms)
 
USDSKEL_API bool UsdSkelMakeTransforms (TfSpan< const GfVec3f > translations, TfSpan< const GfQuatf > rotations, TfSpan< const GfVec3h > scales, TfSpan< GfMatrix4f > xforms)
 
USDSKEL_API bool UsdSkelMakeTransforms (const VtVec3fArray &translations, const VtQuatfArray &rotations, const VtVec3hArray &scales, VtMatrix4dArray *xforms)
 
USDSKEL_API bool UsdSkelMakeTransforms (const GfVec3f *translations, const GfQuatf *rotations, const GfVec3h *scales, GfMatrix4d *xforms, size_t count)
 
USDSKEL_API bool UsdSkelNormalizeWeights (TfSpan< float > weights, int numInfluencesPerComponent)
 
USDSKEL_API bool UsdSkelNormalizeWeights (VtFloatArray *weights, int numInfluencesPerComponent)
 
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)
 
USDSKEL_API bool UsdSkelExpandConstantInfluencesToVarying (VtIntArray *indices, size_t size)
 
USDSKEL_API bool UsdSkelExpandConstantInfluencesToVarying (VtFloatArray *weights, size_t size)
 
USDSKEL_API bool UsdSkelResizeInfluences (VtIntArray *indices, int srcNumInfluencesPerComponent, int newNumInfluencesPerComponent)
 
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)
 
USDSKEL_API bool UsdSkelSkinPointsLBS (const GfMatrix4d &geomBindTransform, TfSpan< const GfMatrix4d > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, int numInfluencesPerPoint, TfSpan< GfVec3f > points, bool inSerial=false)
 
USDSKEL_API bool UsdSkelSkinPointsLBS (const GfMatrix4f &geomBindTransform, TfSpan< const GfMatrix4f > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, int numInfluencesPerPoint, TfSpan< GfVec3f > points, bool inSerial=false)
 
USDSKEL_API bool UsdSkelSkinPointsLBS (const GfMatrix4d &geomBindTransform, TfSpan< const GfMatrix4d > jointXforms, TfSpan< const GfVec2f > influences, int numInfluencesPerPoint, TfSpan< GfVec3f > points, bool inSerial=false)
 Skin points using linear blend skinning, with interleaved influences. More...
 
USDSKEL_API bool UsdSkelSkinPointsLBS (const GfMatrix4f &geomBindTransform, TfSpan< const GfMatrix4f > jointXforms, TfSpan< const GfVec2f > influences, int numInfluencesPerPoint, TfSpan< GfVec3f > points, bool inSerial=false)
 
USDSKEL_API bool UsdSkelSkinPointsLBS (const GfMatrix4d &geomBindTransform, const VtMatrix4dArray &jointXforms, const VtIntArray &jointIndices, const VtFloatArray &jointWeights, int numInfluencesPerPoint, VtVec3fArray *points)
 
USDSKEL_API bool UsdSkelSkinPointsLBS (const GfMatrix4d &geomBindTransform, const GfMatrix4d *jointXforms, size_t numJoints, const int *jointIndices, const float *jointWeights, size_t numInfluences, int numInfluencesPerPoint, GfVec3f *points, size_t numPoints, bool inSerial=false)
 
USDSKEL_API bool UsdSkelSkinNormalsLBS (const GfMatrix3d &geomBindTransform, TfSpan< const GfMatrix3d > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, int numInfluencesPerPoint, TfSpan< GfVec3f > normals, bool inSerial=false)
 
USDSKEL_API bool UsdSkelSkinNormalsLBS (const GfMatrix3f &geomBindTransform, TfSpan< const GfMatrix3f > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, int numInfluencesPerPoint, TfSpan< GfVec3f > normals, bool inSerial=false)
 
USDSKEL_API bool UsdSkelSkinNormalsLBS (const GfMatrix3d &geomBindTransform, TfSpan< const GfMatrix3d > jointXforms, TfSpan< const GfVec2f > influences, int numInfluencesPerPoint, TfSpan< GfVec3f > normals, bool inSerial=false)
 
USDSKEL_API bool UsdSkelSkinNormalsLBS (const GfMatrix3f &geomBindTransform, TfSpan< const GfMatrix3f > jointXforms, TfSpan< const GfVec2f > influences, int numInfluencesPerPoint, TfSpan< GfVec3f > normals, bool inSerial=false)
 
USDSKEL_API bool UsdSkelSkinTransformLBS (const GfMatrix4d &geomBindTransform, TfSpan< const GfMatrix4d > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, GfMatrix4d *xform)
 
USDSKEL_API bool UsdSkelSkinTransformLBS (const GfMatrix4f &geomBindTransform, TfSpan< const GfMatrix4f > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, GfMatrix4f *xform)
 
USDSKEL_API bool UsdSkelSkinTransformLBS (const GfMatrix4d &geomBindTransform, TfSpan< const GfMatrix4d > jointXforms, TfSpan< const GfVec2f > influences, GfMatrix4d *xform)
 
USDSKEL_API bool UsdSkelSkinTransformLBS (const GfMatrix4f &geomBindTransform, TfSpan< const GfMatrix4f > jointXforms, TfSpan< const GfVec2f > influences, GfMatrix4f *xform)
 
USDSKEL_API bool UsdSkelSkinTransformLBS (const GfMatrix4d &geomBindTransform, const GfMatrix4d *jointXforms, size_t numJoints, const int *jointIndices, const float *jointWeights, size_t numInfluences, GfMatrix4d *xform)
 
USDSKEL_API bool UsdSkelApplyBlendShape (const float weight, const TfSpan< const GfVec3f > offsets, const TfSpan< const int > indices, TfSpan< GfVec3f > points)
 

Detailed Description

Collection of utility methods.

Definition in file utils.h.