fbxsdk/core/math/fbxaffinematrix.h Source File
 
 
 
fbxsdk/core/math/fbxaffinematrix.h
Go to the documentation of this file.
00001 /****************************************************************************************
00002  
00003    Copyright (C) 2013 Autodesk, Inc.
00004    All rights reserved.
00005  
00006    Use of this software is subject to the terms of the Autodesk license agreement
00007    provided at the time of installation or download, or which otherwise accompanies
00008    this software in either electronic or hard copy form.
00009  
00010 ****************************************************************************************/
00011 
00013 #ifndef _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_
00014 #define _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_
00015 
00016 #include <fbxsdk/fbxsdk_def.h>
00017 
00018 #include <fbxsdk/core/math/fbxvector4.h>
00019 
00020 #include <fbxsdk/fbxsdk_nsbegin.h>
00021 
00031 class FBXSDK_DLL FbxAMatrix : public FbxDouble4x4
00032 {
00033 public:
00038 
00039                 FbxAMatrix();
00040 
00044                 FbxAMatrix(const FbxAMatrix& pOther);
00045 
00051                 FbxAMatrix(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
00052 
00054                 ~FbxAMatrix();
00056 
00066                 double Get(int pY, int pX) const;
00067 
00071                 FbxVector4 GetT() const;
00072 
00077                 FbxVector4 GetR() const;
00078 
00082                 FbxQuaternion GetQ() const;
00083 
00087                 FbxVector4 GetS() const;
00088 
00093                 FbxVector4 GetRow(int pY) const;
00094 
00099                 FbxVector4 GetColumn(int pX) const;
00100 
00102                 void SetIdentity();
00103 
00107                 void SetT(const FbxVector4& pT);
00108 
00113                 void SetR(const FbxVector4& pR);
00114 
00118                 void SetQ(const FbxQuaternion& pQ);
00119 
00123                 void SetS(const FbxVector4& pS);
00124 
00130                 void SetTRS(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
00131 
00137                 void SetTQS(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
00138 
00142                 FbxAMatrix& operator=(const FbxAMatrix& pM);
00144 
00157                 FbxAMatrix operator*(double pValue) const;
00158 
00167                 FbxAMatrix operator/(double pValue) const;
00168 
00177                 FbxAMatrix& operator*=(double pValue);
00178 
00187                 FbxAMatrix& operator/=(double pValue);
00189 
00198                 FbxVector4 MultT(const FbxVector4& pVector4) const;
00199 
00204                 FbxVector4 MultR(const FbxVector4& pVector4) const;
00205                 
00210                 FbxQuaternion MultQ(const FbxQuaternion& pQuaternion) const;
00211 
00216                 FbxVector4 MultS(const FbxVector4& pVector4) const;
00218 
00226                 FbxAMatrix operator-() const;
00227                 
00252                 FbxAMatrix operator*(const FbxAMatrix& pOther) const;
00253 
00258                 FbxAMatrix& operator*=(const FbxAMatrix& pOther);
00259 
00263                 FbxAMatrix Inverse() const;
00264 
00268                 FbxAMatrix Transpose() const;
00270 
00279                 bool operator==(const FbxAMatrix& pOther) const;
00280 
00285                 bool operator!=(const FbxAMatrix& pOther) const;
00287 
00292 
00293                 operator double* ();
00295                 operator const double* () const;
00297                 typedef const double(kDouble44)[4][4] ;
00299                 inline kDouble44 & Double44() const { return *((kDouble44 *)&mData); }
00301 
00304         bool IsIdentity(const double pThreshold=FBXSDK_TOLERANCE);
00305 
00306 /*****************************************************************************************************************************
00307 ** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
00308 *****************************************************************************************************************************/
00309 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00310         FbxAMatrix(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
00311 
00312         void SetTRS(const FbxVector4& pT, const FbxAMatrix& pRM, const FbxVector4& pS);
00313     void SetRow(int pY, const FbxVector4& pRow);
00314     void SetR(const FbxVector4& pV, const int pOrd); 
00315     void SetTOnly(const FbxVector4& pT);
00316     void SetROnly(const FbxVector4& pR);
00317     void SetQOnly(const FbxQuaternion& pQ);
00318         FbxVector4 GetROnly() const;
00319         FbxVector4 GetR(const int pOrd) const;
00320     FbxQuaternion GetUnnormalizedQ() const;
00321 
00322     void MultRM(const FbxVector4& pR);
00323     void MultSM(const FbxVector4& pS);
00324     bool IsRightHand() const;
00325     double Determinant() const;
00326         int Compare(const FbxAMatrix pM, const double pThreshold=FBXSDK_TOLERANCE) const;
00327 #endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
00328 };
00329 
00330 #include <fbxsdk/fbxsdk_nsend.h>
00331 
00332 #endif /* _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_ */