24 #ifndef PXR_USD_USD_SKEL_UTILS_H
25 #define PXR_USD_USD_SKEL_UTILS_H
43 #include "pxr/base/vt/array.h"
142 const VtMatrix4dArray& xforms,
143 const VtMatrix4dArray& inverseXforms,
144 VtMatrix4dArray* jointLocalXforms,
155 const VtMatrix4dArray& xforms,
156 VtMatrix4dArray* jointLocalXforms,
204 const VtMatrix4dArray& jointLocalXforms,
205 VtMatrix4dArray* xforms,
223 template <
typename Matrix4>
229 const Matrix4* rootXform=
nullptr);
238 VtVec3fArray* extent,
249 VtVec3fArray* extent,
265 template <
typename Matrix4>
274 template <
typename Matrix4>
306 VtVec3fArray* translations,
307 VtQuatfArray* rotations,
308 VtVec3hArray* scales);
324 template <
typename Matrix4>
333 template <
typename Matrix4>
365 const VtQuatfArray& rotations,
366 const VtVec3hArray& scales,
367 VtMatrix4dArray* xforms);
396 float eps = std::numeric_limits<float>::epsilon());
410 int numInfluencesPerComponent);
417 int numInfluencesPerComponent);
444 int srcNumInfluencesPerComponent,
445 int newNumInfluencesPerComponent);
451 int srcNumInfluencesPerComponent,
452 int newNumInfluencesPerComponent);
484 int numInfluencesPerPoint,
486 bool inSerial=
false);
497 int numInfluencesPerPoint,
499 bool inSerial=
false);
509 int numInfluencesPerPoint,
511 bool inSerial=
false);
521 int numInfluencesPerPoint,
523 bool inSerial=
false);
532 const VtMatrix4dArray& jointXforms,
533 const VtIntArray& jointIndices,
534 const VtFloatArray& jointWeights,
535 int numInfluencesPerPoint,
547 const int* jointIndices,
548 const float* jointWeights,
549 size_t numInfluences,
550 int numInfluencesPerPoint,
553 bool inSerial=
false);
562 int numInfluencesPerPoint,
564 bool inSerial=
false);
573 int numInfluencesPerPoint,
575 bool inSerial=
false);
584 int numInfluencesPerPoint,
586 bool inSerial=
false);
594 int numInfluencesPerPoint,
596 bool inSerial=
false);
604 const VtMatrix4dArray& jointXforms,
605 const VtIntArray& jointIndices,
606 const VtFloatArray& jointWeights,
607 int numInfluencesPerPoint,
618 const int* jointIndices,
619 const float* jointWeights,
620 size_t numInfluences,
621 int numInfluencesPerPoint,
624 bool inSerial=
false);
644 int numInfluencesPerPoint,
646 bool inSerial=
false);
657 int numInfluencesPerPoint,
659 bool inSerial=
false);
669 int numInfluencesPerPoint,
671 bool inSerial=
false);
681 int numInfluencesPerPoint,
683 bool inSerial=
false);
694 int numInfluencesPerPoint,
697 bool inSerial=
false);
707 int numInfluencesPerPoint,
710 bool inSerial=
false);
719 int numInfluencesPerPoint,
721 bool inSerial=
false);
731 int numInfluencesPerPoint,
733 bool inSerial=
false);
742 int numInfluencesPerPoint,
744 bool inSerial=
false);
753 int numInfluencesPerPoint,
755 bool inSerial=
false);
764 int numInfluencesPerPoint,
767 bool inSerial=
false);
776 int numInfluencesPerPoint,
779 bool inSerial=
false);
833 const int* jointIndices,
834 const float* jointWeights,
835 size_t numInfluences,
880 const int* jointIndices,
881 const float* jointWeights,
882 size_t numInfluences,
902 #endif // PXR_USD_USD_SKEL_UTILS_H
USDSKEL_API bool UsdSkelSkinPoints(const TfToken &skinningMethod, 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 UsdSkelInterleaveInfluences(const TfSpan< const int > &indices, const TfSpan< const float > &weights, TfSpan< GfVec2f > interleavedInfluences)
GLsizei GLenum const void * indices
GLdouble GLdouble GLint GLint const GLdouble * points
USDSKEL_API bool UsdSkelIsSkinnablePrim(const UsdPrim &prim)
USDSKEL_API bool UsdSkelSkinFaceVaryingNormalsLBS(const GfMatrix3d &geomBindTransform, TfSpan< const GfMatrix3d > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, int numInfluencesPerPoint, TfSpan< const int > faceVertexIndices, TfSpan< GfVec3f > normals, bool inSerial=false)
Skin normals with faceVarying interpolation using linear blend skinning.
USDSKEL_API bool UsdSkelExpandConstantInfluencesToVarying(VtIntArray *indices, size_t size)
USDSKEL_API bool UsdSkelResizeInfluences(VtIntArray *indices, int srcNumInfluencesPerComponent, int newNumInfluencesPerComponent)
GLuint GLsizei const GLuint const GLintptr * offsets
GA_API const UT_StringHolder scale
GT_API const UT_StringHolder topology
USDSKEL_API bool UsdSkelSortInfluences(TfSpan< int > indices, TfSpan< float > weights, int numInfluencesPerComponent)
Sort joint influences such that highest weight values come first.
ImageBuf OIIO_API rotate(const ImageBuf &src, float angle, string_view filtername=string_view(), float filterwidth=0.0f, bool recompute_roi=false, ROI roi={}, int nthreads=0)
USDSKEL_API bool UsdSkelApplyBlendShape(const float weight, const TfSpan< const GfVec3f > offsets, const TfSpan< const int > indices, TfSpan< GfVec3f > points)
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
USDSKEL_API bool UsdSkelSkinFaceVaryingNormals(const TfToken &skinningMethod, const GfMatrix3d &geomBindTransform, TfSpan< const GfMatrix3d > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, int numInfluencesPerPoint, TfSpan< const int > faceVertexIndices, TfSpan< GfVec3f > normals, bool inSerial=false)
Skin normals with faceVarying interpolation using LBS or DQS.
USDSKEL_API bool UsdSkelSkinTransformLBS(const GfMatrix4d &geomBindTransform, TfSpan< const GfMatrix4d > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, GfMatrix4d *xform)
#define PXR_NAMESPACE_CLOSE_SCOPE
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 UsdSkelSkinTransform(const TfToken &skinningMethod, const GfMatrix4d &geomBindTransform, TfSpan< const GfMatrix4d > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, GfMatrix4d *xform)
USDSKEL_API bool UsdSkelSkinNormals(const TfToken &skinningMethod, const GfMatrix3d &geomBindTransform, TfSpan< const GfMatrix3d > jointXforms, TfSpan< const int > jointIndices, TfSpan< const float > jointWeights, int numInfluencesPerPoint, TfSpan< GfVec3f > normals, bool inSerial=false)
PUGI__FN char_t * translate(char_t *buffer, const char_t *from, const char_t *to, size_t to_length)
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 UsdSkelIsSkelAnimationPrim(const UsdPrim &prim)
Returns true if prim is a valid skel animation source.
USDSKEL_API bool UsdSkelNormalizeWeights(TfSpan< float > weights, int numInfluencesPerComponent, float eps=std::numeric_limits< float >::epsilon())