FBX SDK Reference Guide: kfbxmatrix.h Source File
Go to the documentation of this file.
00001 
00004 #ifndef _FBXSDK_MATRIX_H_
00005 #define _FBXSDK_MATRIX_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 
00043 #include <kaydaradef.h>
00044 #ifndef KFBX_DLL 
00045     #define KFBX_DLL K_DLLIMPORT
00046 #endif
00047 
00048 #include <kaydara.h>
00049 
00050 #include <kfbxplugins/kfbxtypes.h>
00051 #include <kfbxmath/kfbxvector4.h>
00052 
00053 #include <fbxfilesdk_nsbegin.h>
00054 
00055 class KFbxQuaternion;
00056 class KFbxXMatrix;
00057 
00058 
00062 class KFBX_DLL KFbxMatrix : public fbxDouble44
00063 {
00064 
00065 public:
00066 
00071 
00073     KFbxMatrix ();
00074 
00076     KFbxMatrix (const KFbxMatrix& pM);
00077 
00083     KFbxMatrix (KFbxVector4& pT,
00084                 KFbxVector4& pR,
00085                 KFbxVector4& pS);
00086 
00092     KFbxMatrix (KFbxVector4& pT,
00093                 KFbxQuaternion& pQ,
00094                 KFbxVector4& pS);
00095 
00099     KFbxMatrix (const KFbxXMatrix& pM);
00100         
00102     ~KFbxMatrix ();
00103         
00105 
00110 
00116     double Get(int pY, int pX);
00117 
00122     KFbxVector4 GetRow(int pY);
00123 
00128     KFbxVector4 GetColumn(int pX);
00129 
00135     void Set(int pY, int pX, double pValue);
00136 
00138     void SetIdentity();
00139     
00145     void SetTRS(KFbxVector4& pT,
00146                 KFbxVector4& pR,
00147                 KFbxVector4& pS);
00148 
00154     void SetTQS(KFbxVector4& pT,
00155                 KFbxQuaternion& pQ,
00156                 KFbxVector4& pS);
00157 
00162     void SetRow(int pY, KFbxVector4& pRow);
00163 
00168     void SetColumn(int pX, KFbxVector4& pColumn);
00169 
00173     KFbxMatrix& operator=(const KFbxMatrix& pMatrix);
00174     
00176 
00181 
00185     KFbxMatrix operator-();
00186     
00191     KFbxMatrix operator+(const KFbxMatrix& pMatrix) const;
00192 
00197     KFbxMatrix operator-(const KFbxMatrix& pMatrix) const;
00198 
00203     KFbxMatrix operator*(const KFbxMatrix& pMatrix) const;
00204 
00209     KFbxMatrix& operator+=(KFbxMatrix& pMatrix);
00210 
00215     KFbxMatrix& operator-=(KFbxMatrix& pMatrix);
00216 
00221     KFbxMatrix& operator*=(KFbxMatrix& pMatrix);
00222 
00226     KFbxMatrix Transpose();
00227 
00229 
00234 
00239     KFbxVector4 MultNormalize(const KFbxVector4& pVector) const;
00240 
00242 
00247 
00252     bool operator==(KFbxMatrix& pM);
00253     bool operator==(KFbxMatrix const& pM) const;
00254 
00259     bool operator==(KFbxXMatrix& pM);
00260     bool operator==(KFbxXMatrix const& pM) const;
00261 
00266     bool operator!=(KFbxMatrix& pM);
00267     bool operator!=(KFbxMatrix const& pM) const;
00268 
00273     bool operator!=(KFbxXMatrix& pM);
00274     bool operator!=(KFbxXMatrix const& pM) const;
00275 
00276     
00278 
00283     
00285     operator double* ();
00286 
00287     typedef const double(kDouble44)[4][4] ;
00288 
00289     inline kDouble44 & Double44() const { return *((kDouble44 *)&mData); }
00290 
00292 
00293     // Matrix data.
00294 //  double mData[4][4];
00295 
00296 };
00297 
00298 inline EFbxType FbxTypeOf( KFbxMatrix   const &pItem )  { return eDOUBLE44; }
00299 
00300 
00301 #include <fbxfilesdk_nsend.h>
00302 
00303 #endif // #ifndef _FBXSDK_MATRIX_H_
00304 
00305