Loading...
Searching...
No Matches
utils.h
Go to the documentation of this file.
1//
2// Copyright 2018 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_UTILS_H
8#define PXR_USD_IMAGING_USD_SKEL_IMAGING_UTILS_H
9
14
15#include "pxr/pxr.h"
16#include "pxr/usdImaging/usdSkelImaging/api.h"
17
18#include "pxr/base/vt/array.h"
19
20
21PXR_NAMESPACE_OPEN_SCOPE
22
23
24class HdMeshTopology;
25class UsdSkelTopology;
26
27
31
32
36USDSKELIMAGING_API
37bool
39 HdMeshTopology* meshTopology,
40 size_t* numPoints);
41
42
47USDSKELIMAGING_API
48bool
50 const VtMatrix4dArray& jointSkelXforms,
51 size_t numPoints,
52 VtVec3fArray* points);
53
55USDSKELIMAGING_API
56bool
58 const GfMatrix4d* jointSkelXforms,
59 GfVec3f* points, size_t numPoints);
60
61
67USDSKELIMAGING_API
68bool
70 VtIntArray* jointIndices,
71 size_t numPoints);
72
73
75USDSKELIMAGING_API
76bool
78 int* jointIndices, size_t numPoints);
79
84USDSKELIMAGING_API
85void
87 const GfMatrix4d& parentXform,
88 GfVec3f* points);
89
91
92
93PXR_NAMESPACE_CLOSE_SCOPE
94
95
96#endif // PXR_USD_IMAGING_USD_SKEL_IMAGING_UTILS_H
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:71
Basic type for a vector of 3 float components.
Definition: vec3f.h:46
Topology data for meshes.
Definition: meshTopology.h:38
Object holding information describing skeleton topology.
Definition: topology.h:29
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.
USDSKELIMAGING_API bool UsdSkelImagingComputeBoneTopology(const UsdSkelTopology &skelTopology, HdMeshTopology *meshTopology, size_t *numPoints)
Compute mesh topology for imaging skelTopology.
USDSKELIMAGING_API void UsdSkelImagingComputePointsForSingleBone(const GfMatrix4d &xform, const GfMatrix4d &parentXform, GfVec3f *points)
Compute mesh points for imaging a single bone of a skeleton.
USDSKELIMAGING_API bool UsdSkelImagingComputeBoneJointIndices(const UsdSkelTopology &topology, VtIntArray *jointIndices, size_t numPoints)
Compute joint indices corresponding to each point in a bone mesh.