fbxvector4.h

Go to the documentation of this file.
00001 /****************************************************************************************
00002  
00003    Copyright (C) 2013 Autodesk, Inc.
00004    All rights reserved.
00005  
00006    Use of this software is subject to the terms of the Autodesk license agreement
00007    provided at the time of installation or download, or which otherwise accompanies
00008    this software in either electronic or hard copy form.
00009  
00010 ****************************************************************************************/
00011 
00013 #ifndef _FBXSDK_CORE_MATH_VECTOR_4_H_
00014 #define _FBXSDK_CORE_MATH_VECTOR_4_H_
00015 
00016 #include <fbxsdk/fbxsdk_def.h>
00017 
00018 #include <fbxsdk/fbxsdk_nsbegin.h>
00019 
00020 class FbxQuaternion;
00021 
00025 class FBXSDK_DLL FbxVector4 : public FbxDouble4
00026 {
00027 public:
00032 
00033         FbxVector4();
00034 
00038         FbxVector4(const FbxVector4& pVector4);
00039 
00046         FbxVector4(double pX, double pY, double pZ, double pW=1.0);
00047 
00051         FbxVector4(const double pValue[4]);
00052 
00057         FbxVector4(const FbxDouble3& pValue);
00059 
00068         FbxVector4& operator=(const FbxVector4& pVector4);
00069 
00074         FbxVector4& operator=(const double* pValue);
00075 
00081         FbxVector4& operator=(const FbxDouble3& pValue);
00082 
00089         void Set(double pX, double pY, double pZ, double pW=1.0);
00091 
00101         FbxVector4 operator+(double pValue) const;
00102 
00108         FbxVector4 operator-(double pValue) const;
00109 
00115         FbxVector4 operator*(double pValue) const;
00116 
00122         FbxVector4 operator/(double pValue) const;
00123 
00129         FbxVector4& operator+=(double pValue);
00130 
00136         FbxVector4& operator-=(double pValue);
00137 
00143         FbxVector4& operator*=(double pValue);
00144 
00150         FbxVector4& operator/=(double pValue);
00152 
00160         FbxVector4 operator-() const;
00161 
00167         FbxVector4 operator+(const FbxVector4& pVector) const;
00168 
00174         FbxVector4 operator-(const FbxVector4& pVector) const;
00175 
00181         FbxVector4 operator*(const FbxVector4& pVector) const;
00182 
00188         FbxVector4 operator/(const FbxVector4& pVector) const;
00189 
00195         FbxVector4& operator+=(const FbxVector4& pVector);
00196 
00202         FbxVector4& operator-=(const FbxVector4& pVector);
00203 
00209         FbxVector4& operator*=(const FbxVector4& pVector);
00210 
00216         FbxVector4& operator/=(const FbxVector4& pVector);
00217 
00223         double DotProduct(const FbxVector4& pVector) const;
00224 
00230         FbxVector4 CrossProduct(const FbxVector4& pVector) const;
00231 
00240         static bool AxisAlignmentInEulerAngle(const FbxVector4& pAB, const FbxVector4& pA, const FbxVector4& pB, FbxVector4& pAngles);
00242 
00251         bool operator==(const FbxVector4 & pVector) const;
00252 
00257         bool operator!=(const FbxVector4 & pVector) const;
00259 
00268         double Length() const;
00269 
00274         double SquareLength() const;
00275 
00281         double Distance(const FbxVector4& pVector) const;
00282 
00286         void Normalize();
00287 
00288 
00292         void SetXYZ(const FbxQuaternion pQuat);
00294 
00299 
00300         operator double* ();
00301 
00303         operator const double* () const;
00305 
00309     bool IsZero(int pSize=4) const;
00310 
00311     // Fix value like 1.#IND, 1.#INF, nan, and inf
00312     void FixIncorrectValue();
00313 
00314 /*****************************************************************************************************************************
00315 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
00316 *****************************************************************************************************************************/
00317 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00318     int Compare(const FbxVector4& pV, const double pThreshold=FBXSDK_TOLERANCE) const;
00319 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
00320 };
00321 
00322 #include <fbxsdk/fbxsdk_nsend.h>
00323 
00324 #endif /* _FBXSDK_CORE_MATH_VECTOR_4_H_ */