kfbxvector4.h

Go to the documentation of this file.
00001 
00004 #ifndef FBXFILESDK_KFBXMATH_KFBXVECTOR4_H
00005 #define FBXFILESDK_KFBXMATH_KFBXVECTOR4_H
00006 
00007 /**************************************************************************************
00008 
00009  Copyright (C) 2001 - 2009 Autodesk, Inc. and/or its licensors.
00010  All Rights Reserved.
00011 
00012  The coded instructions, statements, computer programs, and/or related material 
00013  (collectively the "Data") in these files contain unpublished information 
00014  proprietary to Autodesk, Inc. and/or its licensors, which is protected by 
00015  Canada and United States of America federal copyright law and by international 
00016  treaties. 
00017  
00018  The Data may not be disclosed or distributed to third parties, in whole or in
00019  part, without the prior written consent of Autodesk, Inc. ("Autodesk").
00020 
00021  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00022  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
00023  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR ARISING
00024  BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES OF TITLE, 
00025  NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR USE. 
00026  WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT WARRANT THAT THE OPERATION
00027  OF THE DATA WILL BE UNINTERRUPTED OR ERROR FREE. 
00028  
00029  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
00030  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR EXPENSES
00031  OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE DAMAGES OR OTHER
00032  SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS OF PROFITS, REVENUE
00033  OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR DAMAGES OF ANY KIND),
00034  HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF LIABILITY, WHETHER DERIVED
00035  FROM CONTRACT, TORT (INCLUDING, BUT NOT LIMITED TO, NEGLIGENCE), OR OTHERWISE,
00036  ARISING OUT OF OR RELATING TO THE DATA OR ITS USE OR ANY OTHER PERFORMANCE,
00037  WHETHER OR NOT AUTODESK HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS
00038  OR DAMAGE. 
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     //  WARNING!
00387     //
00388     //  Anything beyond these lines may not be documented accurately and is 
00389     //  subject to change without notice.
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