Loading...
Searching...
No Matches
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
38PXR_NAMESPACE_OPEN_SCOPE
39
40
41class HdMeshTopology;
42class UsdSkelTopology;
43
44
48
49
53USDSKELIMAGING_API
54bool
56 HdMeshTopology* meshTopology,
57 size_t* numPoints);
58
59
64USDSKELIMAGING_API
65bool
67 const VtMatrix4dArray& jointSkelXforms,
68 size_t numPoints,
69 VtVec3fArray* points);
70
72USDSKELIMAGING_API
73bool
75 const GfMatrix4d* jointSkelXforms,
76 GfVec3f* points, size_t numPoints);
77
78
84USDSKELIMAGING_API
85bool
87 VtIntArray* jointIndices,
88 size_t numPoints);
89
90
92USDSKELIMAGING_API
93bool
95 int* jointIndices, size_t numPoints);
96
98
99
100PXR_NAMESPACE_CLOSE_SCOPE
101
102
103#endif // PXR_USD_IMAGING_USD_SKEL_IMAGING_UTILS_H
Stores a 4x4 matrix of double elements.
Definition: matrix4d.h:88
Basic type for a vector of 3 float components.
Definition: vec3f.h:63
Topology data for meshes.
Definition: meshTopology.h:55
Object holding information describing skeleton topology.
Definition: topology.h:46
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 bool UsdSkelImagingComputeBoneJointIndices(const UsdSkelTopology &topology, VtIntArray *jointIndices, size_t numPoints)
Compute joint indices corresponding to each point in a bone mesh.