kfbxvector4.h

Go to the documentation of this file.
00001 
00004 #ifndef _FBXSDK_VECTOR4_H_
00005 #define _FBXSDK_VECTOR4_H_
00006 
00007 /**************************************************************************************
00008 
00009  Copyright © 2001 - 2007 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 <kaydaradef.h>
00043 #ifndef KFBX_DLL 
00044     #define KFBX_DLL K_DLLIMPORT
00045 #endif
00046 
00047 #include <kaydara.h>
00048 #include <klib/karrayul.h>
00049 
00050 #ifndef MB_FBXSDK
00051 #include <kbaselib_nsuse.h>
00052 #endif
00053 
00054 #include <fbxfilesdk_nsbegin.h>
00055 
00059 class KFBX_DLL KFbxVector4
00060 {
00061 
00062 public:
00063 
00068 
00070     KFbxVector4();
00071 
00073     KFbxVector4(const KFbxVector4& pVector4);
00074 
00081     KFbxVector4(double pX, double pY, double pZ, double pW = 1.0);
00082 
00086     KFbxVector4(const double pValue[4]);
00087 
00089     ~KFbxVector4();
00090 
00092 
00097     
00099     KFbxVector4& operator=(const KFbxVector4& pVector4);
00100 
00101     KFbxVector4& operator=(const double* pValue);
00102     
00108     double& operator[](int pIndex);
00109 
00115     double GetAt(int pIndex);   
00116 
00122     void SetAt(int pIndex, double pValue);
00123 
00130     void Set(double pX, double pY, double pZ, double pW = 1.0);
00131     
00133 
00138 
00144     KFbxVector4 operator+(double pValue);
00145 
00151     KFbxVector4 operator-(double pValue);
00152 
00158     KFbxVector4 operator*(double pValue);
00159 
00165     KFbxVector4 operator/(double pValue);
00166 
00172     KFbxVector4& operator+=(double pValue);
00173 
00179     KFbxVector4& operator-=(double pValue);
00180 
00186     KFbxVector4& operator*=(double pValue);
00187 
00193     KFbxVector4& operator/=(double pValue);
00194     
00196 
00201 
00205     KFbxVector4 operator-();
00206     
00212     KFbxVector4 operator+(KFbxVector4& pVector);
00213 
00219     KFbxVector4 operator-(KFbxVector4& pVector);
00220 
00226     KFbxVector4 operator*(KFbxVector4& pVector);
00227 
00233     KFbxVector4 operator/(KFbxVector4& pVector);
00234 
00240     KFbxVector4& operator+=(KFbxVector4& pVector);
00241 
00247     KFbxVector4& operator-=(KFbxVector4& pVector);
00248 
00254     KFbxVector4& operator*=(KFbxVector4& pVector);
00255     
00261     KFbxVector4& operator/=(KFbxVector4& pVector);
00262 
00268     double DotProduct(KFbxVector4& pVector);
00269 
00275     KFbxVector4 CrossProduct(KFbxVector4& pVector);
00276 
00285     static bool AxisAlignmentInEulerAngle(KFbxVector4 pAB, 
00286                                           KFbxVector4 pA, 
00287                                           KFbxVector4 pB, 
00288                                           KFbxVector4& pAngles);
00289     
00291 
00296 
00301     bool operator==(KFbxVector4& pVector);
00302     
00307     bool operator!=(KFbxVector4& pVector);
00308     
00310 
00315 
00320     double Length();
00321 
00326     double SquareLength();
00327 
00333     double Distance(KFbxVector4& pVector);
00334 
00338     void Normalize();
00339 
00341 
00346 
00348     operator double* ();
00349 
00351     operator const double* ();
00352 
00353     operator const double* () const;
00354     
00355     operator const double* const () const ;
00356 
00358 
00360 //
00361 //  WARNING!
00362 //
00363 //  Anything beyond these lines may not be documented accurately and is 
00364 //  subject to change without notice.
00365 //
00367 
00368 #ifndef DOXYGEN_SHOULD_SKIP_THIS    
00369 
00370 
00372     double mData[4];
00373 
00374 #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00375 
00376 };
00377 
00378 typedef  class KFBX_DLL KArrayTemplate<KFbxVector4>             KArrayKFbxVector4;
00379 typedef KFbxVector4* HKFbxVector4;
00380 
00381 #include <fbxfilesdk_nsend.h>
00382 
00383 #endif // #ifndef _FBXSDK_VECTOR4_H_
00384 
00385