FBX C++ API Reference
fbxmatrix.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_MATRIX_H_
14 #define _FBXSDK_CORE_MATH_MATRIX_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
22 class FbxAMatrix;
23 
28 {
29 public:
31 
32  FbxMatrix();
34 
37  FbxMatrix(const FbxMatrix& pM);
38 
41  FbxMatrix(const FbxAMatrix& pM);
42 
47  FbxMatrix(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
48 
53  FbxMatrix(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
54 
72  FbxMatrix( const double p00, const double p10, const double p20, const double p30,
73  const double p01, const double p11, const double p21, const double p31,
74  const double p02, const double p12, const double p22, const double p32,
75  const double p03, const double p13, const double p23, const double p33);
76 
78  ~FbxMatrix();
80 
82 
83 
87  double Get(int pY, int pX) const;
88 
92  FbxVector4 GetRow(int pY) const;
93 
97  FbxVector4 GetColumn(int pX) const;
98 
103  void Set(int pY, int pX, double pValue);
104 
109  void SetTRS(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
110 
115  void SetTQS(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
116 
120  void SetRow(int pY, const FbxVector4& pRow);
121 
125  void SetColumn(int pX, const FbxVector4& pColumn);
126 
133  void GetElements(FbxVector4& pTranslation, FbxQuaternion& pRotation, FbxVector4& pShearing, FbxVector4& pScaling, double& pSign) const;
134 
141  void GetElements(FbxVector4& pTranslation, FbxVector4& pRotation, FbxVector4& pShearing, FbxVector4& pScaling, double& pSign) const;
143 
145 
146 
148  FbxMatrix& operator=(const FbxMatrix& pMatrix);
149 
152  FbxMatrix operator-() const;
153 
157  FbxMatrix operator+(const FbxMatrix& pMatrix) const;
158 
162  FbxMatrix operator-(const FbxMatrix& pMatrix) const;
163 
167  FbxMatrix operator*(const FbxMatrix& pMatrix) const;
168 
172  FbxMatrix& operator+=(const FbxMatrix& pMatrix);
173 
177  FbxMatrix& operator-=(const FbxMatrix& pMatrix);
178 
182  FbxMatrix& operator*=(const FbxMatrix& pMatrix);
183 
187  bool operator==(const FbxMatrix& pM) const;
188 
192  bool operator==(const FbxAMatrix& pM) const;
193 
197  bool operator!=(const FbxMatrix& pM) const;
198 
202  bool operator!=(const FbxAMatrix& pM) const;
204 
206 
207  operator double* ();
209 
211  operator const double* () const;
212 
214  typedef const double(kDouble44)[4][4] ;
215 
217  inline kDouble44 & Double44() const { return *((kDouble44 *)&mData[0][0]); }
219 
221 
222 
224  FbxMatrix Inverse() const;
225 
228  FbxMatrix Transpose() const;
229 
231  void SetIdentity();
232 
237  void SetLookToLH(const FbxVector4& pEyePosition, const FbxVector4& pEyeDirection, const FbxVector4& pUpDirection);
238 
243  void SetLookToRH(const FbxVector4& pEyePosition, const FbxVector4& pEyeDirection, const FbxVector4& pUpDirection);
244 
249  void SetLookAtLH(const FbxVector4& pEyePosition, const FbxVector4& pLookAt, const FbxVector4& pUpDirection);
250 
255  void SetLookAtRH(const FbxVector4& pEyePosition, const FbxVector4& pLookAt, const FbxVector4& pUpDirection);
256 
260  FbxVector4 MultNormalize(const FbxVector4& pVector) const;
262 
263 /*****************************************************************************************************************************
264 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
265 *****************************************************************************************************************************/
266 #ifndef DOXYGEN_SHOULD_SKIP_THIS
267  int Compare(const FbxMatrix pM, const double pThreshold = FBXSDK_TOLERANCE) const;
268  int Compare(const FbxAMatrix pM, const double pThreshold = FBXSDK_TOLERANCE) const;
269 
270  FbxMatrix operator*(double pValue) const;
271  FbxMatrix& operator*=(double pValue);
272 
273  double LUDecomposition(FbxVector4& pVector);
274  FbxMatrix LUMult(FbxMatrix pM, const FbxVector4& pVector) const;
275  double Determinant() const;
276 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
277 };
278 
279 #include <fbxsdk/fbxsdk_nsend.h>
280 
281 #endif /* _FBXSDK_CORE_MATH_MATRIX_H_ */
FbxString operator+(const FbxString &pString1, const FbxString &pString2)
FbxString concatenation.
FBX SDK environment definition.
#define FBXSDK_TOLERANCE
Definition: fbxtypes.h:136
const double(kDouble44)[4][4]
Define 4*4 array as a new type.
Definition: fbxmatrix.h:214
kDouble44 & Double44() const
Cast the matrix in a reference to a 4*4 array.
Definition: fbxmatrix.h:217
FBX SDK quaternion class.
Definition: fbxquaternion.h:27
A four double mathematic vector class.
Definition: fbxvector4.h:25
FBX SDK affine matrix class.
bool operator==(const FbxVectorTemplate4< T > &pVector) const
Definition: fbxtypes.h:250
#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:251
FBX SDK basic 4x4 double matrix class.
Definition: fbxmatrix.h:27