kfbxxmatrix.h

Go to the documentation of this file.
00001 
00004 #ifndef FBXFILESDK_KFBXMATH_KFBXXMATRIX_H
00005 #define FBXFILESDK_KFBXMATH_KFBXXMATRIX_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 #include <fbxfilesdk/fbxfilesdk_def.h>
00042 
00043 #include <fbxfilesdk/kfbxplugins/kfbxtypes.h>
00044 #include <fbxfilesdk/kfbxmath/kfbxquaternion.h>
00045 #include <fbxfilesdk/kfbxmath/kfbxvector4.h>
00046 #include <fbxfilesdk/kfbxmath/kfbxtransformation.h>
00047 
00048 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00049 
00050 class KgeAMatrix;
00051 
00061     class KFBX_DLL KFbxXMatrix : public fbxDouble44
00062     {
00063     public:
00064 
00069 
00071         KFbxXMatrix();
00072 
00076         KFbxXMatrix(const KFbxXMatrix& pXMatrix);
00077 
00083         KFbxXMatrix(const KFbxVector4& pT,
00084                     const KFbxVector4& pR,
00085                     const KFbxVector4& pS);
00086             
00088         ~KFbxXMatrix();
00089             
00091 
00096 
00102         double Get(int pY, int pX) const;
00103 
00107         KFbxVector4 GetT() const;
00108 
00112         KFbxVector4 GetR() const;
00113 
00117         KFbxQuaternion GetQ() const;
00118 
00122         KFbxVector4 GetS() const;
00123 
00128         KFbxVector4 GetRow(int pY) const;
00129 
00134         KFbxVector4 GetColumn(int pX) const;
00135 
00137         void SetIdentity();
00138         
00142         void SetT(const KFbxVector4& pT);
00143 
00147         void SetR(const KFbxVector4& pR);
00148 
00152         void SetQ(const KFbxQuaternion& pQ);
00153 
00157         void SetS(const KFbxVector4& pS);
00158 
00164         void SetTRS(const KFbxVector4& pT,
00165                     const KFbxVector4& pR,
00166                     const KFbxVector4& pS);
00167 
00173         void SetTQS(const KFbxVector4& pT,
00174                     const KFbxQuaternion& pQ,
00175                     const KFbxVector4& pS);
00176 
00180         KFbxXMatrix& operator=(const KFbxXMatrix& pM);
00181         
00183 
00188 
00197         KFbxXMatrix operator*(double pValue) const;
00198 
00207         KFbxXMatrix operator/(double pValue) const;
00208 
00217         KFbxXMatrix& operator*=(double pValue);
00218 
00227         KFbxXMatrix& operator/=(double pValue);
00228 
00230 
00235 
00240         KFbxVector4 MultT(const KFbxVector4& pVector4) const;
00241 
00246         KFbxVector4 MultR(const KFbxVector4& pVector4) const;
00247         
00252         KFbxQuaternion MultQ(const KFbxQuaternion& pQuaternion) const;
00253 
00258         KFbxVector4 MultS(const KFbxVector4& pVector4) const;
00259             
00261 
00266 
00270         KFbxXMatrix operator-() const;
00271         
00276         KFbxXMatrix operator*(const KFbxXMatrix& pXMatrix) const;
00277 
00282         KFbxXMatrix& operator*=(const KFbxXMatrix& pXMatrix);
00283 
00287         KFbxXMatrix Inverse() const;
00288 
00292         KFbxXMatrix Transpose() const;
00293 
00295 
00300 
00305         bool operator==(const KFbxXMatrix & pXMatrix) const;
00306 
00311         bool operator!=(const KFbxXMatrix & pXMatrix) const;
00312         
00314 
00319         
00321         operator double* ();
00323         operator const double* () const;
00325         typedef const double(kDouble44)[4][4] ;
00327         inline kDouble44 & Double44() const { return *((kDouble44 *)&mData); }
00329 
00330         
00331 
00332 
00334     //
00335     //  WARNING!
00336     //
00337     //  Anything beyond these lines may not be documented accurately and is 
00338     //  subject to change without notice.
00339     //
00341 
00342     #ifndef DOXYGEN_SHOULD_SKIP_THIS    
00343         void CreateKFbxXMatrixRotation(double pX, double pY, double pZ);
00344         void V2M(KFbxXMatrix &pMatrix, const KFbxVector4 &pVector, ERotationOrder pRotationOrder);
00345         void M2V(KFbxVector4 &pVector, const KFbxXMatrix &pMatrix, ERotationOrder pRotationOrder);
00346 
00351 
00352         KFbxXMatrix& operator=(const KgeAMatrix& pAMatrix);
00353         operator KgeAMatrix& ();
00354 
00356 
00357     #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00358 
00359     };
00360 
00361     inline EFbxType FbxTypeOf( KFbxXMatrix  const &pItem )  { return eDOUBLE44; }
00362 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00363 
00364 #endif // FBXFILESDK_KFBXMATH_KFBXXMATRIX_H
00365