00001 class Matrix4By4 {
00002 public:
00003 Matrix4By4();
00004 Matrix4By4( const double a1_1, const double a1_2, const double a1_3,
00005 const double a2_1, const double a2_2, const double a2_3,
00006 const double a3_1, const double a3_2, const double a3_3,
00007 const double Xt, const double Yt, const double Zt );
00008
00009 Matrix4By4( const Matrix4By4& m );
00010
00011 double operator[]( const tJ2KMath::EMatrixElems eElem ) const;
00012
00013 friend Matrix4By4 operator*( const Matrix4By4& left,
00014 const Matrix4By4& right );
00015
00016 void operator*=( const Matrix4By4& m );
00017
00018 BOOL operator==( const Matrix4By4& m ) const;
00019 BOOL operator!=( const Matrix4By4& m ) const;
00020
00021 Matrix4By4& operator=( const Matrix4By4& m );
00022
00023
00024 void AppendRotation( const double XAngle,
00025 const double YAngle,
00026 const double ZAngle );
00027
00028 void AppendRotation( const Vector3D& vecAngles );
00029
00030 void AppendScale( const double XScale,
00031 const double YScale,
00032 const double ZScale );
00033
00034 void AppendScale( const Vector3D& vecScale );
00035
00036 void AppendTranslation( const double XTrans,
00037 const double YTrans,
00038 const double ZTrans );
00039
00040 void AppendTranslation( const Vector3D& vecTrans );
00041
00042 void SetToIdentity();
00043
00044 void SetToRotation( const double XDeg,
00045 const double YDeg,
00046 const double ZDeg );
00047
00048 void SetToRotation( const Vector3D& vecAngles );
00049
00050 void SetToScale( const double XScale,
00051 const double YScale,
00052 const double ZScale );
00053
00054 void SetToScale( const Vector3D& vecScale );
00055
00056 void SetToTranslation( const double XTrans,
00057 const double YTrans,
00058 const double ZTrans );
00059
00060 void SetToTranslation( const Vector3D& vecTrans );
00061
00062 void SetToTransposed( const Matrix4By4& mtrxSrc );
00063
00064 void Transform( Vector3D& vecTarget ) const;
00065
00066 void Transform( const Vector3D& vecSource, Vector3D& vecTarget ) const;
00067
00068 void Transpose();
00069
00070 void Zero();
00071
00072 private:
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 union
00085 {
00086 double jMatrix[4][4];
00087 double jArray[16];
00088 };
00089
00090 };
00091