All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
utils.h
Go to the documentation of this file.
1 //
2 // Copyright 2018 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 // names, trademarks, service marks, or product names of the Licensor
11 // and its affiliates, except as required to comply with Section 4(c) of
12 // the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 // http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 #ifndef PXR_USD_IMAGING_USD_SKEL_IMAGING_UTILS_H
25 #define PXR_USD_IMAGING_USD_SKEL_IMAGING_UTILS_H
26 
31 
32 #include "pxr/pxr.h"
33 #include "pxr/usdImaging/usdSkelImaging/api.h"
34 
35 #include "pxr/base/vt/array.h"
36 
37 
38 PXR_NAMESPACE_OPEN_SCOPE
39 
40 
41 class HdMeshTopology;
42 class UsdSkelTopology;
43 
44 
48 
49 
53 USDSKELIMAGING_API
54 bool
56  HdMeshTopology* meshTopology,
57  size_t* numPoints);
58 
59 
64 USDSKELIMAGING_API
65 bool
67  const VtMatrix4dArray& jointSkelXforms,
68  size_t numPoints,
69  VtVec3fArray* points);
70 
72 USDSKELIMAGING_API
73 bool
75  const GfMatrix4d* jointSkelXforms,
76  GfVec3f* points, size_t numPoints);
77 
78 
84 USDSKELIMAGING_API
85 bool
87  VtIntArray* jointIndices,
88  size_t numPoints);
89 
90 
92 USDSKELIMAGING_API
93 bool
95  int* jointIndices, size_t numPoints);
96 
98 
99 
100 PXR_NAMESPACE_CLOSE_SCOPE
101 
102 
103 #endif // PXR_USD_IMAGING_USD_SKEL_IMAGING_UTILS_H
USDSKELIMAGING_API bool UsdSkelImagingComputeBoneJointIndices(const UsdSkelTopology &topology, VtIntArray *jointIndices, size_t numPoints)
Compute joint indices corresponding to each point in a bone mesh.
Object holding information describing skeleton topology.
Definition: topology.h:45
Basic type for a vector of 3 float components.
Definition: vec3f.h:63
USDSKELIMAGING_API bool UsdSkelImagingComputeBoneTopology(const UsdSkelTopology &skelTopology, HdMeshTopology *meshTopology, size_t *numPoints)
Compute mesh topology for imaging skelTopology.
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:88
USDSKELIMAGING_API bool UsdSkelImagingComputeBonePoints(const UsdSkelTopology &topology, const VtMatrix4dArray &jointSkelXforms, size_t numPoints, VtVec3fArray *points)
Compute mesh points for imaging a skeleton, given the topology of the skeleton and skelXforms...
Topology data for meshes.
Definition: meshTopology.h:55