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 
00042 #include <fbxfilesdk/components/kbaselib/kaydaradef_h.h>
00043 #include <fbxfilesdk/components/kbaselib/kaydara.h>
00044 
00045 #include <fbxfilesdk/kfbxplugins/kfbxtypes.h>
00046 #include <fbxfilesdk/kfbxmath/kfbxquaternion.h>
00047 #include <fbxfilesdk/kfbxmath/kfbxvector4.h>
00048 #include <fbxfilesdk/kfbxmath/kfbxtransformation.h>
00049 
00050 #include <fbxfilesdk/components/kbaselib/kbaselib_forward.h>
00051 
00052 #include <fbxfilesdk/fbxfilesdk_nsbegin.h>
00053 
00063     class KFBX_DLL KFbxXMatrix : public fbxDouble44
00064     {
00065     public:
00066 
00071 
00073         KFbxXMatrix();
00074 
00078         KFbxXMatrix(const KFbxXMatrix& pXMatrix);
00079 
00085         KFbxXMatrix(const KFbxVector4& pT,
00086                     const KFbxVector4& pR,
00087                     const KFbxVector4& pS);
00088             
00090         ~KFbxXMatrix();
00091             
00093 
00098 
00104         double Get(int pY, int pX) const;
00105 
00109         KFbxVector4 GetT() const;
00110 
00114         KFbxVector4 GetR() const;
00115 
00119         KFbxQuaternion GetQ() const;
00120 
00124         KFbxVector4 GetS() const;
00125 
00130         KFbxVector4 GetRow(int pY) const;
00131 
00136         KFbxVector4 GetColumn(int pX) const;
00137 
00139         void SetIdentity();
00140         
00144         void SetT(const KFbxVector4& pT);
00145 
00149         void SetR(const KFbxVector4& pR);
00150 
00154         void SetQ(const KFbxQuaternion& pQ);
00155 
00159         void SetS(const KFbxVector4& pS);
00160 
00166         void SetTRS(const KFbxVector4& pT,
00167                     const KFbxVector4& pR,
00168                     const KFbxVector4& pS);
00169 
00175         void SetTQS(const KFbxVector4& pT,
00176                     const KFbxQuaternion& pQ,
00177                     const KFbxVector4& pS);
00178 
00182         KFbxXMatrix& operator=(const KFbxXMatrix& pM);
00183         
00185 
00190 
00199         KFbxXMatrix operator*(double pValue) const;
00200 
00209         KFbxXMatrix operator/(double pValue) const;
00210 
00219         KFbxXMatrix& operator*=(double pValue);
00220 
00229         KFbxXMatrix& operator/=(double pValue);
00230 
00232 
00237 
00242         KFbxVector4 MultT(const KFbxVector4& pVector4) const;
00243 
00248         KFbxVector4 MultR(const KFbxVector4& pVector4) const;
00249         
00254         KFbxQuaternion MultQ(const KFbxQuaternion& pQuaternion) const;
00255 
00260         KFbxVector4 MultS(const KFbxVector4& pVector4) const;
00261             
00263 
00268 
00272         KFbxXMatrix operator-() const;
00273         
00278         KFbxXMatrix operator*(const KFbxXMatrix& pXMatrix) const;
00279 
00284         KFbxXMatrix& operator*=(const KFbxXMatrix& pXMatrix);
00285 
00289         KFbxXMatrix Inverse() const;
00290 
00294         KFbxXMatrix Transpose() const;
00295 
00297 
00302 
00307         bool operator==(const KFbxXMatrix & pXMatrix) const;
00308 
00313         bool operator!=(const KFbxXMatrix & pXMatrix) const;
00314         
00316 
00321         
00323         operator double* ();
00325         operator const double* () const;
00327         typedef const double(kDouble44)[4][4] ;
00329         inline kDouble44 & Double44() const { return *((kDouble44 *)&mData); }
00331 
00332         
00333 
00334 
00336     //
00337     //  WARNING!
00338     //
00339     //  Anything beyond these lines may not be documented accurately and is 
00340     //  subject to change without notice.
00341     //
00343 
00344     #ifndef DOXYGEN_SHOULD_SKIP_THIS    
00345         void CreateKFbxXMatrixRotation(double pX, double pY, double pZ);
00346         void V2M(KFbxXMatrix &pMatrix, const KFbxVector4 &pVector, ERotationOrder pRotationOrder);
00347         void M2V(KFbxVector4 &pVector, const KFbxXMatrix &pMatrix, ERotationOrder pRotationOrder);
00348 
00353 
00354         KFbxXMatrix& operator=(const KgeAMatrix& pAMatrix);
00355         operator KgeAMatrix& ();
00356 
00358 
00359     #endif // #ifndef DOXYGEN_SHOULD_SKIP_THIS
00360 
00361     };
00362 
00363     inline EFbxType FbxTypeOf( KFbxXMatrix  const &pItem )  { return eDOUBLE44; }
00364 #include <fbxfilesdk/fbxfilesdk_nsend.h>
00365 
00366 #endif // FBXFILESDK_KFBXMATH_KFBXXMATRIX_H
00367