HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GU_ExtractTransform.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  */
7 
8 #ifndef __GU_ExtractTransform_h__
9 #define __GU_ExtractTransform_h__
10 
11 #include "GU_API.h"
12 
13 #include <UT/UT_Quaternion.h>
14 #include <UT/UT_Vector3.h>
15 #include <UT/UT_VectorTypes.h>
16 
17 class GA_Range;
18 class GU_Detail;
19 
20 namespace GU_ExtractTransform
21 {
22 /// Specifies whether to only compute the best-fit rigid transform, allow
23 /// for a uniform scale, or allow for non-uniform scales.
24 enum class Method
25 {
26  Rigid,
29 };
30 
31 struct GU_API Result
32 {
33  UT_Vector3D myPivot = {0, 0, 0};
34  UT_Vector3D myPosition = {0, 0, 0};
35  UT_QuaternionD myRotate = {0, 0, 0, 1};
36  UT_Vector3D myScale = {1, 1, 1};
37  fpreal myDistortion = 0;
38 };
39 
40 /// Computes the best-fit transform that aligns the reference geometry (A)
41 /// points with the target geometry (B) points.
42 GU_API void solve(const GU_Detail &gdp_a,
43  const GA_Range &pts_a,
44  const GU_Detail &gdp_b,
45  const GA_Range &pts_b,
46  Method method,
47  bool compute_distortion,
48  Result &result);
49 }
50 
51 #endif
A range of elements in an index-map.
Definition: GA_Range.h:42
GLuint64EXT * result
Definition: glew.h:14311
#define GU_API
Definition: GU_API.h:14
fpreal64 fpreal
Definition: SYS_Types.h:277
GU_API void solve(const GU_Detail &gdp_a, const GA_Range &pts_a, const GU_Detail &gdp_b, const GA_Range &pts_b, Method method, bool compute_distortion, Result &result)