HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
skelGuideData.h
Go to the documentation of this file.
1 //
2 // Copyright 2025 Pixar
3 //
4 // Licensed under the terms set forth in the LICENSE.txt file available at
5 // https://openusd.org/license.
6 //
7 #ifndef PXR_USD_IMAGING_USD_SKEL_IMAGING_SKEL_GUIDE_DATA_H
8 #define PXR_USD_IMAGING_USD_SKEL_IMAGING_SKEL_GUIDE_DATA_H
9 
11 
13 
14 #include "pxr/usd/sdf/path.h"
17 
18 #include "pxr/base/vt/array.h"
19 
21 
23 
25 
26 /// Data to compute the skeleton guide as mesh.
27 ///
28 /// The data can be given to the below functions to obtain the topology
29 /// and geometry of the mesh.
30 ///
31 /// The mesh depicts the posed skeleton by rendering each skeleton joint that has
32 /// a parent joint as a pyramid-shaped bone.
33 /// the UsdSkelTopology. Some points of the bone are affected by the underlying
34 /// joint and other by its parent joint.
35 ///
37 {
38  /// Path of skeleton prim - used only to emit warnings/errors.
40 
41  /// Number of joints in UsdSkelTopology to create the data.
42  ///
43  /// Used only to emit warnings/errors.
44  ///
45  size_t numJoints;
46 
47  /// Indices into joints of UsdSkelTopology - one for each point of the mesh.
48  ///
49  /// Corresponds to
50  /// UsdSkelSkeletonAdapter::_SkelData::_boneMeshJointIndices.
51  ///
52  VtIntArray boneJointIndices;
53 
54  /// The points of the mesh before applying the skinning transforms.
55  ///
56  /// Corresponds to
57  /// UsdSkelSkeletonAdapter::_SkelData::_boneMeshPoints.
58  ///
59  VtVec3fArray boneMeshPoints;
60 };
61 
62 /// Compute data.
66  const UsdSkelImagingSkelData &skelData);
67 
68 /// Compute faceVertexCounts of mesh topology for guide.
70 VtIntArray
72  const UsdSkelImagingSkelGuideData &skelGuideData);
73 
74 /// Compute faceVertexIndices of mesh topology for guide.
76 VtIntArray
78  const UsdSkelImagingSkelGuideData &skelGuideData);
79 
80 /// Apply skinning transforms to obtain posed mesh points.
82 VtVec3fArray
84  const UsdSkelImagingSkelGuideData &skelGuideData,
85  const VtArray<GfMatrix4f> &skinningTransforms);
86 
88 
89 #endif
USDSKELIMAGING_API VtIntArray UsdSkelImagingComputeSkelGuideFaceVertexIndices(const UsdSkelImagingSkelGuideData &skelGuideData)
Compute faceVertexIndices of mesh topology for guide.
Definition: path.h:273
USDSKELIMAGING_API VtIntArray UsdSkelImagingComputeSkelGuideFaceVertexCounts(const UsdSkelImagingSkelGuideData &skelGuideData)
Compute faceVertexCounts of mesh topology for guide.
#define USDSKELIMAGING_API
Definition: api.h:23
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
Definition: path.h:1425
SdfPath primPath
Path of skeleton prim - used only to emit warnings/errors.
Definition: skelGuideData.h:39
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition: pxr.h:74
USDSKELIMAGING_API VtVec3fArray UsdSkelImagingComputeSkelGuidePoints(const UsdSkelImagingSkelGuideData &skelGuideData, const VtArray< GfMatrix4f > &skinningTransforms)
Apply skinning transforms to obtain posed mesh points.
USDSKELIMAGING_API UsdSkelImagingSkelGuideData UsdSkelImagingComputeSkelGuideData(const UsdSkelImagingSkelData &skelData)
Compute data.