FBX C++ API Reference
fbxvector4.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_VECTOR_4_H_
14 #define _FBXSDK_CORE_MATH_VECTOR_4_H_
15 
16 #include <fbxsdk/fbxsdk_def.h>
17 
18 #include <fbxsdk/fbxsdk_nsbegin.h>
19 
20 class FbxQuaternion;
21 
26 {
27 public:
32  FbxVector4();
34 
38  FbxVector4(const FbxVector4& pVector4);
39 
46  FbxVector4(double pX, double pY, double pZ, double pW=1.0);
47 
51  FbxVector4(const double pValue[4]);
52 
57  FbxVector4(const FbxDouble3& pValue);
59 
68  FbxVector4& operator=(const FbxVector4& pVector4);
69 
74  FbxVector4& operator=(const double* pValue);
75 
81  FbxVector4& operator=(const FbxDouble3& pValue);
82 
89  void Set(double pX, double pY, double pZ, double pW=1.0);
91 
101  FbxVector4 operator+(double pValue) const;
102 
108  FbxVector4 operator-(double pValue) const;
109 
115  FbxVector4 operator*(double pValue) const;
116 
122  FbxVector4 operator/(double pValue) const;
123 
129  FbxVector4& operator+=(double pValue);
130 
136  FbxVector4& operator-=(double pValue);
137 
143  FbxVector4& operator*=(double pValue);
144 
150  FbxVector4& operator/=(double pValue);
152 
160  FbxVector4 operator-() const;
161 
167  FbxVector4 operator+(const FbxVector4& pVector) const;
168 
174  FbxVector4 operator-(const FbxVector4& pVector) const;
175 
181  FbxVector4 operator*(const FbxVector4& pVector) const;
182 
188  FbxVector4 operator/(const FbxVector4& pVector) const;
189 
195  FbxVector4& operator+=(const FbxVector4& pVector);
196 
202  FbxVector4& operator-=(const FbxVector4& pVector);
203 
209  FbxVector4& operator*=(const FbxVector4& pVector);
210 
216  FbxVector4& operator/=(const FbxVector4& pVector);
217 
223  double DotProduct(const FbxVector4& pVector) const;
224 
230  FbxVector4 CrossProduct(const FbxVector4& pVector) const;
231 
240  static bool AxisAlignmentInEulerAngle(const FbxVector4& pAB, const FbxVector4& pA, const FbxVector4& pB, FbxVector4& pAngles);
242 
251  bool operator==(const FbxVector4 & pVector) const;
252 
257  bool operator!=(const FbxVector4 & pVector) const;
259 
268  double Length() const;
269 
274  double SquareLength() const;
275 
281  double Distance(const FbxVector4& pVector) const;
282 
286  void Normalize();
287 
288 
292  void SetXYZ(const FbxQuaternion pQuat);
294 
299  operator double* ();
301 
303  operator const double* () const;
305 
309  bool IsZero(int pSize=4) const;
310 
311  // Fix value like 1.#IND, 1.#INF, nan, and inf
312  void FixIncorrectValue();
313 
314 /*****************************************************************************************************************************
315 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
316 *****************************************************************************************************************************/
317 #ifndef DOXYGEN_SHOULD_SKIP_THIS
318  int Compare(const FbxVector4& pV, const double pThreshold=FBXSDK_TOLERANCE) const;
319 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
320 };
321 
322 #include <fbxsdk/fbxsdk_nsend.h>
323 
324 #endif /* _FBXSDK_CORE_MATH_VECTOR_4_H_ */
FbxString operator+(const FbxString &pString1, const FbxString &pString2)
FbxString concatenation.
FBX SDK environment definition.
#define FBXSDK_TOLERANCE
Definition: fbxtypes.h:136
FBX SDK quaternion class.
Definition: fbxquaternion.h:27
A four double mathematic vector class.
Definition: fbxvector4.h:25
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