fbxsdk/core/math/fbxaffinematrix.h Source File

fbxaffinematrix.h
Go to the documentation of this file.
1 /****************************************************************************************
2 
3  Copyright (C) 2015 Autodesk, Inc.
4  All rights reserved.
5 
6  Use of this software is subject to the terms of the Autodesk license agreement
7  provided at the time of installation or download, or which otherwise accompanies
8  this software in either electronic or hard copy form.
9 
10 ****************************************************************************************/
11 
13 #ifndef _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_
14 #define _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
32 {
33 public:
38  FbxAMatrix();
40 
44  FbxAMatrix(const FbxAMatrix& pOther);
45 
51  FbxAMatrix(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
52 
54  ~FbxAMatrix();
56 
66  double Get(int pY, int pX) const;
67 
71  FbxVector4 GetT() const;
72 
77  FbxVector4 GetR() const;
78 
82  FbxQuaternion GetQ() const;
83 
87  FbxVector4 GetS() const;
88 
93  FbxVector4 GetRow(int pY) const;
94 
99  FbxVector4 GetColumn(int pX) const;
100 
102  void SetIdentity();
103 
107  void SetT(const FbxVector4& pT);
108 
113  void SetR(const FbxVector4& pR);
114 
118  void SetQ(const FbxQuaternion& pQ);
119 
123  void SetS(const FbxVector4& pS);
124 
130  void SetTRS(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
131 
137  void SetTQS(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
138 
142  FbxAMatrix& operator=(const FbxAMatrix& pM);
144 
157  FbxAMatrix operator*(double pValue) const;
158 
167  FbxAMatrix operator/(double pValue) const;
168 
177  FbxAMatrix& operator*=(double pValue);
178 
187  FbxAMatrix& operator/=(double pValue);
189 
198  FbxVector4 MultT(const FbxVector4& pVector4) const;
199 
204  FbxVector4 MultR(const FbxVector4& pVector4) const;
205 
210  FbxQuaternion MultQ(const FbxQuaternion& pQuaternion) const;
211 
216  FbxVector4 MultS(const FbxVector4& pVector4) const;
218 
226  FbxAMatrix operator-() const;
227 
252  FbxAMatrix operator*(const FbxAMatrix& pOther) const;
253 
258  FbxAMatrix& operator*=(const FbxAMatrix& pOther);
259 
263  FbxAMatrix Inverse() const;
264 
268  FbxAMatrix Transpose() const;
269 
274  FbxAMatrix Slerp(const FbxAMatrix& pOther, double pWeight) const;
276 
285  bool operator==(const FbxAMatrix& pOther) const;
286 
291  bool operator!=(const FbxAMatrix& pOther) const;
293 
298  operator double* ();
301  operator const double* () const;
303  typedef const double(kDouble44)[4][4] ;
305  inline kDouble44 & Double44() const { return *((kDouble44 *)&mData[0][0]); }
307 
310  bool IsIdentity(const double pThreshold=FBXSDK_TOLERANCE);
311 
312 /*****************************************************************************************************************************
313 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
314 *****************************************************************************************************************************/
315 #ifndef DOXYGEN_SHOULD_SKIP_THIS
316  FbxAMatrix(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
317 
318  void SetTRS(const FbxVector4& pT, const FbxAMatrix& pRM, const FbxVector4& pS);
319  void SetRow(int pY, const FbxVector4& pRow);
320  void SetTOnly(const FbxVector4& pT);
321  void SetROnly(const FbxVector4& pR);
322  void SetQOnly(const FbxQuaternion& pQ);
323  FbxVector4 GetROnly() const;
324  FbxQuaternion GetUnnormalizedQ() const;
325 
326  // pOrd is assumed to be an FbxEuler::EOrder (or its synonym EFbxRotationOrder)
327  void SetR(const FbxVector4& pV, const int pOrd);
328  FbxVector4 GetR(const int pOrd) const;
329 
330  void MultRM(const FbxVector4& pR);
331  void MultSM(const FbxVector4& pS);
332  bool IsRightHand() const;
333  double Determinant() const;
334  int Compare(const FbxAMatrix pM, const double pThreshold=FBXSDK_TOLERANCE) const;
335 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
336 };
337 
338 #include <fbxsdk/fbxsdk_nsend.h>
339 
340 #endif /* _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_ */
FBX SDK environment definition.
kDouble44 & Double44() const
Cast the matrix in a reference to a 4*4 array.
#define FBXSDK_TOLERANCE
Definition: fbxtypes.h:136
bool operator!=(const FbxVectorTemplate4< T > &pVector) const
Definition: fbxtypes.h:251
const double(kDouble44)[4][4]
Define 4*4 array as a new type.
FBX SDK quaternion class.
Definition: fbxquaternion.h:27
A four double mathematic vector class.
Definition: fbxvector4.h:25
FBX SDK affine matrix class.
#define FBXSDK_DLL
Definition: fbxarch.h:173
FbxVectorTemplate4< T > & operator=(const T &pValue)
Definition: fbxtypes.h:247
bool operator==(const FbxVectorTemplate4< T > &pVector) const
Definition: fbxtypes.h:250