fbxsdk/core/math/fbxquaternion.h Source File

fbxquaternion.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_QUATERNION_H_
14 #define _FBXSDK_CORE_MATH_QUATERNION_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
19 
20 #include <fbxsdk/fbxsdk_nsbegin.h>
21 
28 {
29 public:
37  FbxQuaternion();
38 
42  FbxQuaternion(const FbxQuaternion& pV);
43 
50  FbxQuaternion(double pX, double pY, double pZ, double pW = 1.0);
51 
55  FbxQuaternion(const FbxVector4& pAxis, double pDegree);
56 
58  ~FbxQuaternion();
60 
68  FbxQuaternion& operator=(const FbxQuaternion& pQuaternion);
69 
75  double& operator[](int pIndex);
76 
82  const double& operator[](int pIndex) const;
83 
89  double GetAt(int pIndex) const;
90 
96  void SetAt(int pIndex, double pValue);
97 
104  void Set(double pX, double pY, double pZ, double pW = 1.0);
106 
115  FbxQuaternion operator+(double pValue) const;
116 
121  FbxQuaternion operator-(double pValue) const;
122 
128  FbxQuaternion operator*(double pValue) const;
129 
135  FbxQuaternion operator/(double pValue) const;
136 
141  FbxQuaternion& operator+=(double pValue);
142 
147  FbxQuaternion& operator-=(double pValue);
148 
154  FbxQuaternion& operator*=(double pValue);
155 
161  FbxQuaternion& operator/=(double pValue);
163 
171  FbxQuaternion operator-() const;
172 
178  FbxQuaternion operator+(const FbxQuaternion& pQuaternion) const;
179 
185  FbxQuaternion operator-(const FbxQuaternion& pQuaternion) const;
186 
192  FbxQuaternion operator*(const FbxQuaternion& pOther) const;
193 
199  FbxQuaternion operator/(const FbxQuaternion& pOther) const;
200 
206  FbxQuaternion& operator+=(const FbxQuaternion& pQuaternion);
207 
213  FbxQuaternion& operator-=(const FbxQuaternion& pQuaternion);
214 
220  FbxQuaternion& operator*=(const FbxQuaternion& pOther);
221 
227  FbxQuaternion& operator/=(const FbxQuaternion& pOther);
228 
233  FbxQuaternion Product(const FbxQuaternion& pOther) const;
234 
239  double DotProduct(const FbxQuaternion& pQuaternion) const;
240 
243  void Normalize();
244 
248  void Conjugate();
249 
253  double Length();
254 
260  void Inverse();
261 
265  void SetAxisAngle(const FbxVector4& pAxis, double pDegree);
266 
270  FbxQuaternion Slerp(const FbxQuaternion& pOther, double pWeight) const;
271 
275  void ComposeSphericalXYZ(const FbxVector4 pEuler);
276 
280  FbxVector4 DecomposeSphericalXYZ() const;
282 
291  bool operator==(const FbxQuaternion & pV) const;
292 
297  bool operator!=(const FbxQuaternion & pV) const;
299 
304  operator double* ();
306 
308  operator const double* () const;
310 
320  int Compare(const FbxQuaternion &pQ2, const double pThreshold = FBXSDK_TOLERANCE) const;
322 
323 /*****************************************************************************************************************************
324 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
325 *****************************************************************************************************************************/
326 #ifndef DOXYGEN_SHOULD_SKIP_THIS
327  void GetQuaternionFromPositionToPosition(const FbxVector4 &pP0, const FbxVector4 &pP1);
328 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
329 };
330 
331 #include <fbxsdk/fbxsdk_nsend.h>
332 
333 #endif /* _FBXSDK_CORE_MATH_QUATERNION_H_ */
FbxString operator+(const FbxString &pString1, const FbxString &pString2)
FbxString concatenation.
FBX SDK environment definition.
#define FBXSDK_TOLERANCE
Definition: fbxtypes.h:136
bool operator!=(const FbxVectorTemplate4< T > &pVector) const
Definition: fbxtypes.h:251
T & operator[](int pIndex)
Definition: fbxtypes.h:244
FBX SDK quaternion class.
Definition: fbxquaternion.h:27
A four double mathematic vector class.
Definition: fbxvector4.h:25
#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