dvm3_rotmat.h
00001 #ifndef dvm3_rotmat_h_INCLUDED
00002 #define dvm3_rotmat_h_INCLUDED
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include <dvm3/dvm3_matrix.h>
00032 #include <cfloat>
00033
00034
00035
00036
00037
00069 class dvm3_RotMat
00070 : public dvm3_Matrix
00071 {
00072 public:
00073
00115 enum EEulerAngleType { EOSAC_az_el_clock = 0,
00116 EX_convention = 1,
00117 EY_convention = 2 };
00118
00132 enum EInputVecPair { E_XY, E_YZ, E_ZX, E_XZ, E_ZY, E_YX };
00133
00137 ~dvm3_RotMat();
00138
00142 dvm3_RotMat();
00143
00149 dvm3_RotMat( dvm3_RotMat const& m );
00150
00169 dvm3_RotMat( dvm3_Vector const& x,
00170 dvm3_Vector const& y,
00171 dvm3_Vector const& z,
00172 double const tol = 100.0 * DBL_EPSILON );
00173
00192 dvm3_RotMat( double const x[],
00193 double const y[],
00194 double const z[],
00195 double const tol = 100.0 * DBL_EPSILON );
00196
00235 dvm3_RotMat( double angle0, double angle1, double angle2,
00236 EEulerAngleType angle_type = EOSAC_az_el_clock );
00237
00285 dvm3_RotMat( dvm3_Vector const& v0,
00286 dvm3_Vector const& v1,
00287 EInputVecPair type
00288 );
00289
00337 dvm3_RotMat( double const v0[],
00338 double const v1[],
00339 EInputVecPair type
00340 );
00341
00378 void init( double angle0, double angle1, double angle2,
00379 EEulerAngleType angle_type = EOSAC_az_el_clock );
00380
00426 void init( dvm3_Vector const& v0,
00427 dvm3_Vector const& v1,
00428 EInputVecPair type
00429 );
00430
00476 void init( double const v0[],
00477 double const v1[],
00478 EInputVecPair type
00479 );
00480
00488 dvm3_RotMat& operator=( dvm3_RotMat const& rhs );
00489
00490
00491
00492
00493
00494
00498 void invert();
00499
00507 int is_rotation_matrix( double const tol = 100.0 * DBL_EPSILON ) const;
00508
00509
00510 };
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526 inline dvm3_RotMat::
00527 ~dvm3_RotMat()
00528 {}
00529
00530
00531 inline dvm3_RotMat::
00532 dvm3_RotMat( dvm3_RotMat const& other )
00533 : dvm3_Matrix( other )
00534 {}
00535
00536
00537 inline dvm3_RotMat& dvm3_RotMat::
00538 operator=( dvm3_RotMat const& m )
00539 { data_ = m.data_; return *this; }
00540
00541 #endif