00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00026 #pragma once
00027 #endif
00028
00029
00030
00031
00032
00033 #ifndef _ROTMAT_H_
00034 #define _ROTMAT_H_
00035
00036
00037
00038
00039
00040 #include "SIBCMathLib.h"
00041
00042
00043
00044
00045
00047
00063 class XSICOREEXPORT CSIBCRotMatd : private CSIBCMatrix33d
00064 {
00065
00066 public:
00067
00068
00069
00070
00076 CSIBCRotMatd( void );
00077
00090 CSIBCRotMatd( const CSIBCVector3Dd& in_vct0,
00091 const CSIBCVector3Dd& in_vct1,
00092 const CSIBCVector3Dd& in_vct2,
00093 const bool in_bAreRows = true );
00094
00110 CSIBCRotMatd(
00111 const double in_dA00, const double in_dA01, const double in_dA02,
00112 const double in_dA10, const double in_dA11, const double in_dA12,
00113 const double in_dA20, const double in_dA21, const double in_dA22 );
00114
00115
00116 ~CSIBCRotMatd();
00117
00118
00119
00120
00121
00128 double Get( const int in_nRow, const int in_nCol ) const;
00129
00130
00131
00132
00133
00143 CSIBCRotMatd& Set( int in_nRow, int in_nCol, const double in_dVal );
00144
00154 CSIBCRotMatd& Set( double in_dVal[3][3] );
00155
00164 CSIBCRotMatd& Set( const CSIBCMatrix33d& in_mat );
00165
00174 CSIBCRotMatd& Set( const CSIBCRotMatd& in_mat );
00175
00176
00177
00184 CSIBCRotMatd& Set( const E3DAxisType in_axis, const double in_dAngle );
00185
00195 CSIBCRotMatd& SetRow( const int in_nRow, const CSIBCVector3Dd& in_vct );
00196
00207 CSIBCRotMatd& SetRow( const int in_nRow, double in_dA0, double in_dA1, double in_dA2 );
00208
00218 CSIBCRotMatd& SetCol( const int in_nCol, const CSIBCVector3Dd& in_vct );
00219
00230 CSIBCRotMatd& SetCol( const int in_nCol, double in_dA0, double in_dA1, double in_dA2 );
00231
00237 CSIBCRotMatd& SetNull();
00238
00244 CSIBCRotMatd& SetIdentity( void );
00245
00246
00247
00248
00249
00250
00261 friend bool AreAlmostEqual( const CSIBCRotMatd& in_mat1,
00262 const CSIBCRotMatd& in_mat2,
00263 const double in_dEpsilon = PICO_EPS );
00264
00265
00273 bool operator ==( const CSIBCMatrix33d & in_mat ) const;
00274
00282 bool operator !=( const CSIBCMatrix33d & in_mat ) const;
00283
00284
00285
00286
00287
00298 CSIBCRotMatd& Mul( const CSIBCRotMatd& in_mat1, const CSIBCRotMatd& in_mat2 );
00299
00309 CSIBCRotMatd& Mul( const CSIBCRotMatd& in_mat );
00310
00321 CSIBCRotMatd& MulTransByReg( const CSIBCRotMatd& in_mat1,
00322 const CSIBCRotMatd& in_mat2 );
00323
00334 CSIBCRotMatd& MulRegByTrans( const CSIBCRotMatd& in_mat1,
00335 const CSIBCRotMatd& in_mat2 );
00336
00343 CSIBCRotMatd& Negate( const CSIBCRotMatd& in_mat );
00344
00350 CSIBCRotMatd& Negate();
00351
00357 double GetDet( void ) const;
00358
00363 double GetTrace( void ) const;
00364
00372 CSIBCRotMatd& Transpose( const CSIBCRotMatd& in_mat );
00373
00379 CSIBCRotMatd& Transpose( void );
00380
00388 CSIBCRotMatd& Invert( const CSIBCRotMatd& in_mat );
00389
00396 CSIBCRotMatd& Invert( void );
00397
00398
00399 protected:
00400
00401
00402 private:
00403
00404
00405 CSIBCRotMatd( const CSIBCRotMatd& in_mat );
00406 CSIBCRotMatd& operator =( const CSIBCRotMatd& in_mat );
00407 };
00408
00409
00410 #endif