FBX SDK Reference Guide: kfbxvector4.h Source File
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 © 2001 - 2008 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     double const& operator[](int pIndex) const;
00132 
00138     double GetAt(int pIndex);   
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);
00168 
00174     KFbxVector4 operator-(double pValue);
00175 
00181     KFbxVector4 operator*(double pValue);
00182 
00188     KFbxVector4 operator/(double pValue);
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-();
00229     
00235     KFbxVector4 operator+(KFbxVector4& pVector);
00236 
00242     KFbxVector4 operator-(KFbxVector4& pVector);
00243 
00249     KFbxVector4 operator*(KFbxVector4& pVector);
00250 
00256     KFbxVector4 operator/(KFbxVector4& pVector);
00257 
00263     KFbxVector4& operator+=(KFbxVector4& pVector);
00264 
00270     KFbxVector4& operator-=(KFbxVector4& pVector);
00271 
00277     KFbxVector4& operator*=(KFbxVector4& pVector);
00278     
00284     KFbxVector4& operator/=(KFbxVector4& pVector);
00285 
00291     double DotProduct(KFbxVector4& pVector);
00292 
00298     KFbxVector4 CrossProduct(KFbxVector4& pVector);
00299 
00308     static bool AxisAlignmentInEulerAngle(KFbxVector4 const& pAB, 
00309                                           KFbxVector4 const& pA, 
00310                                           KFbxVector4 const& pB, 
00311                                           KFbxVector4& pAngles);
00312     
00314 
00319 
00324     bool operator==(KFbxVector4& pVector);
00325 
00330     bool operator==(KFbxVector4 const& pVector) const;
00331     
00336     bool operator!=(KFbxVector4& pVector);
00337 
00342     bool operator!=(KFbxVector4 const& pVector) const;
00343     
00345 
00350 
00355     double Length();
00356 
00361     double SquareLength();
00362 
00368     double Distance(KFbxVector4& pVector);
00369 
00373     void Normalize();
00374 
00375 
00379     void SetXYZ(KFbxQuaternion pQuat);
00380 
00382 
00387 
00389     operator double* ();
00390 
00392     operator const double* ();
00393 
00395     operator const double* () const;
00396     
00397 
00399 
00401     //
00402     //  WARNING!
00403     //
00404     //  Anything beyond these lines may not be documented accurately and is 
00405     //  subject to change without notice.
00406     //
00408 
00409     #ifndef DOXYGEN_SHOULD_SKIP_THIS    
00410 
00411 
00412 
00413     #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00414 
00415     };
00416 
00417     typedef  class KFBX_DLL KArrayTemplate<KFbxVector4>             KArrayKFbxVector4;
00418     typedef KFbxVector4* HKFbxVector4;
00419 
00420     inline EFbxType FbxTypeOf( KFbxVector4  const &pItem )  { return eDOUBLE4; }
00421 
00422 
00423 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00424 
00425 #endif // FBXFILESDK_KFBXMATH_KFBXVECTOR4_H
00426