00001 
00004 #ifndef FBXFILESDK_KFBXMATH_KFBXVECTOR4_H
00005 #define FBXFILESDK_KFBXMATH_KFBXVECTOR4_H
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 #include <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
00043 #include <fbxfilesdk/components/kbaselib/kaydara.h>
00044 #include <fbxfilesdk/components/kbaselib/klib/karrayul.h>
00045 
00046 #include <fbxfilesdk/kfbxplugins/kfbxtypes.h>
00047 
00048 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00049 class KFbxQuaternion;
00053     class KFBX_DLL KFbxVector4 : public fbxDouble4
00054     {
00055 
00056     public:
00057 
00062 
00064     KFbxVector4();
00065 
00069     KFbxVector4(const KFbxVector4& pVector4);
00070 
00077     KFbxVector4(double pX, double pY, double pZ, double pW = 1.0);
00078 
00082     KFbxVector4(const double pValue[4]);
00083 
00088     KFbxVector4(const fbxDouble3& pValue);
00089 
00091     ~KFbxVector4();
00092 
00094 
00099     
00104     KFbxVector4& operator=(const KFbxVector4& pVector4);
00105 
00110     KFbxVector4& operator=(const double* pValue);
00111     
00117     KFbxVector4& operator=(const fbxDouble3& pValue);
00118 
00124     double& operator[](int pIndex);
00125 
00131     const double & operator[](int pIndex) const;
00132 
00138     double GetAt(int pIndex) const;
00139 
00145     void SetAt(int pIndex, double pValue);
00146 
00153     void Set(double pX, double pY, double pZ, double pW = 1.0);
00154     
00156 
00161 
00167     KFbxVector4 operator+(double pValue) const;
00168 
00174     KFbxVector4 operator-(double pValue) const;
00175 
00181     KFbxVector4 operator*(double pValue) const;
00182 
00188     KFbxVector4 operator/(double pValue) const;
00189 
00195     KFbxVector4& operator+=(double pValue);
00196 
00202     KFbxVector4& operator-=(double pValue);
00203 
00209     KFbxVector4& operator*=(double pValue);
00210 
00216     KFbxVector4& operator/=(double pValue);
00217     
00219 
00224 
00228     KFbxVector4 operator-() const;
00229     
00235     KFbxVector4 operator+(const KFbxVector4& pVector) const;
00236 
00242     KFbxVector4 operator-(const KFbxVector4& pVector) const;
00243 
00249     KFbxVector4 operator*(const KFbxVector4& pVector) const;
00250 
00256     KFbxVector4 operator/(const KFbxVector4& pVector) const;
00257 
00263     KFbxVector4& operator+=(const KFbxVector4& pVector);
00264 
00270     KFbxVector4& operator-=(const KFbxVector4& pVector);
00271 
00277     KFbxVector4& operator*=(const KFbxVector4& pVector);
00278     
00284     KFbxVector4& operator/=(const KFbxVector4& pVector);
00285 
00291     double DotProduct(const KFbxVector4& pVector) const;
00292 
00298     KFbxVector4 CrossProduct(const KFbxVector4& pVector) const;
00299 
00308     static bool AxisAlignmentInEulerAngle(const KFbxVector4 & pAB, 
00309                                           const KFbxVector4 & pA, 
00310                                           const KFbxVector4 & pB, 
00311                                           KFbxVector4& pAngles);
00312     
00314 
00319 
00324     bool operator==(const KFbxVector4 & pVector) const;
00325 
00330     bool operator!=(const KFbxVector4 & pVector) const;
00331     
00333 
00338 
00343     double Length() const;
00344 
00349     double SquareLength() const;
00350 
00356     double Distance(const KFbxVector4& pVector) const;
00357 
00361     void Normalize();
00362 
00363 
00367     void SetXYZ(const KFbxQuaternion pQuat);
00368 
00370 
00375 
00377     operator double* ();
00378 
00380     operator const double* () const;
00381 
00383 
00385     
00386     
00387     
00388     
00389     
00390     
00392 
00393     #ifndef DOXYGEN_SHOULD_SKIP_THIS    
00394 
00395 
00396 
00397     #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00398 
00399     };
00400 
00401     typedef  class KFBX_DLL KArrayTemplate<KFbxVector4>             KArrayKFbxVector4;
00402     typedef KFbxVector4* HKFbxVector4;
00403 
00404     inline EFbxType FbxTypeOf( KFbxVector4  const &pItem )  { return eDOUBLE4; }
00405 
00406 
00407 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00408 
00409 #endif // FBXFILESDK_KFBXMATH_KFBXVECTOR4_H
00410