00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GENLIB2_SSTRANSF_INCLUDED
00022 #define GENLIB2_SSTRANSF_INCLUDED
00023
00024 #include "drotmatrix3.h"
00025
00026 namespace GenLib2
00027 {
00028
00060 class SSTransform
00061 {
00062 public:
00064 SSTransform();
00065
00067 void set_translation(double dx, double dy, double dz) {
00068 _dx = dx; _dy = dy; _dz = dz; }
00069
00071 void set_rot_matrix(const DRotMatrix3& rm) { _rot_matrix = rm; }
00072
00074 void set_scale(double s) { _scale = s; }
00075
00079
00080
00081
00082
00083
00085
00090 void set_rot_matrix(double eps_x, double eps_y, double eps_z);
00091
00095 void transform(double x1, double y1, double z1,
00096 double& x2, double& y2, double& z2) const;
00097
00101 void inv_transform(double x2, double y2, double z2,
00102 double& x1, double& y1, double& z1) const;
00103
00108 bool read(istream& is);
00109
00111 void print(ostream& os) const;
00112
00114 void invert();
00115
00116 private:
00118 double _dx;
00119
00121 double _dy;
00122
00124 double _dz;
00125
00127 DRotMatrix3 _rot_matrix;
00128
00130 double _scale;
00131 };
00132
00133 }
00134
00135 #endif