00001 00028 #ifndef _QUATERNION_H_ 00029 #define _QUATERNION_H_ 00030 00031 namespace geometry 00032 { 00033 class Quaternion 00034 { 00035 public: 00036 Quaternion(); 00037 Quaternion(double nx, double ny, double nz, double nw); 00038 Quaternion(Quaternion& q); 00039 Quaternion(const Quaternion& q); 00040 ~Quaternion(); 00041 00051 Quaternion euler_to_quaternion(float pitch, float yaw, float roll); 00052 void normalise(Quaternion quater); 00053 00054 double x; 00055 double y; 00056 double z; 00057 double w; 00058 00059 private: 00060 static const double pi_over_360; 00061 00062 }; 00063 00064 class Translation 00065 { 00066 public: 00067 Translation(); 00068 Translation(double nx, double ny, double nz); 00069 Translation(Translation& t); 00070 Translation(const Translation& t); 00071 00072 double x; 00073 double y; 00074 double z; 00075 }; 00076 00077 class Pose 00078 { 00079 public: 00080 Pose(); 00081 ~Pose(); 00082 00083 Translation translation; 00084 00085 Quaternion quaternion; 00086 }; 00087 }; 00088 00089 #endif