| Revision: | 1452 |
| Committed: | Mon Aug 23 15:11:36 2004 UTC (21 years, 2 months ago) by tim |
| File size: | 683 byte(s) |
| Log Message: | *** empty log message *** |
| # | User | Rev | Content |
|---|---|---|---|
| 1 | tim | 1254 | #ifndef _QUATERNION_H_ |
| 2 | #define _QUATERNION_H_ | ||
| 3 | #include <iostream> | ||
| 4 | tim | 1452 | #include "Vector4d.hpp" |
| 5 | tim | 1254 | using namespace std; |
| 6 | |||
| 7 | class Mat3x3d; | ||
| 8 | class Euler3; | ||
| 9 | class Vector3d; | ||
| 10 | |||
| 11 | tim | 1452 | class Quaternion : public Vector4d{ |
| 12 | tim | 1254 | public: |
| 13 | Quaternion(){ | ||
| 14 | tim | 1452 | x = 1.0; |
| 15 | y = 0.0; | ||
| 16 | z = 0.0; | ||
| 17 | w = 0.0; | ||
| 18 | tim | 1254 | } |
| 19 | |||
| 20 | Quaternion(Mat3x3d& m); | ||
| 21 | |||
| 22 | Quaternion(const Euler3& e); | ||
| 23 | tim | 1452 | |
| 24 | Quaternion& operator=( const Vector4d& v1 ){ | ||
| 25 | if(this == & v1) | ||
| 26 | return *this; | ||
| 27 | |||
| 28 | this->x = v1.x; | ||
| 29 | this->y = v1.y; | ||
| 30 | this->z = v1.z; | ||
| 31 | this->w = v1.w; | ||
| 32 | |||
| 33 | return *this; | ||
| 34 | } | ||
| 35 | tim | 1254 | |
| 36 | Mat3x3d toRotationMatrix(); | ||
| 37 | Euler3 toEuler(); | ||
| 38 | tim | 1452 | |
| 39 | tim | 1254 | }; |
| 40 | |||
| 41 | #endif //end ifndef _QUATERNION_H_ |
| Name | Value |
|---|---|
| svn:executable | * |