Files Classes Functions Hierarchy
00001 #ifndef D2HOMOGENEOUS_H 00002 #define D2HOMOGENEOUS_H 00003 00004 00005 #include <point.h> 00006 00007 #include <print.h> 00008 00009 00010 class d2homogeneous; 00011 00032 class d2homogeneous 00033 { 00034 public: 00035 00037 double matrix[9]; 00038 00040 d2homogeneous(); 00041 00043 d2homogeneous( doublec * matrix_); 00044 00046 void matrixMultiply 00047 ( 00048 point3<double> & p2, 00049 point3<double> const & p 00050 ) const; 00051 00053 void matrixMultiply 00054 ( 00055 point2<double> & p2, 00056 point2<double> const & p 00057 ) const; 00058 00060 void matrixMultiply( point2<double> & p ) const; 00061 00062 00064 void setTranslate(point2<double> const & p); 00065 00067 void setRotate(doublec theta); 00068 00070 void setIdentity(); 00073 void setZero(); 00074 00076 void setRotateAboutPoint 00077 ( 00078 doublec theta, 00079 point2<double> const & p 00080 ); 00081 00084 d2homogeneous & operator *= (d2homogeneous const & w); 00085 00087 void rowk(point3<double> & x, uintc k) const 00088 { uintc w=3*k; x.x=matrix[0+w]; x.y=matrix[1+w]; 00089 x.z=matrix[2+w]; } 00090 00092 void columnk(point3<double> & x, uintc k) const 00093 { x.x=matrix[0+k]; x.y=matrix[3+k]; x.z=matrix[6+k]; } 00094 00096 operator string() const; 00097 }; 00098 00101 d2homogeneous & operator * 00102 ( 00103 d2homogeneous & a, 00104 d2homogeneous const & b 00105 ); 00106 00107 00108 00109 00110 #endif 00111 00112
1.5.8