Revision: | 1254 |
Committed: | Wed Jun 9 16:16:33 2004 UTC (20 years, 11 months ago) by tim |
File size: | 615 byte(s) |
Log Message: | 1. adding some useful math classes(Mat3x3d, Vector3d, Quaternion, Euler3) these classes use anonymous union and struct to support double[3], double[3][3] and double[4] 2. adding roll constraint algorithm |
# | User | Rev | Content |
---|---|---|---|
1 | tim | 1254 | #ifndef _EULER3_H_ |
2 | #define _EULER3_H_ | ||
3 | |||
4 | class Quaternion; | ||
5 | class Mat3x3d; | ||
6 | class Vector3d; | ||
7 | |||
8 | class Euler3{ | ||
9 | public: | ||
10 | Euler3(); | ||
11 | Euler3(double theta, double phi, double psi){ | ||
12 | this->theta = theta; | ||
13 | this->phi = phi; | ||
14 | this->psi = psi; | ||
15 | } | ||
16 | |||
17 | Euler3(double e[3]){ | ||
18 | theta = e[0]; | ||
19 | phi = e[1]; | ||
20 | psi = e[2]; | ||
21 | } | ||
22 | |||
23 | Euler3(const Vector3d& v); | ||
24 | |||
25 | Euler3(Mat3x3d& m); | ||
26 | |||
27 | Euler3(Quaternion& q); | ||
28 | |||
29 | public: | ||
30 | union{ | ||
31 | struct{ | ||
32 | double theta; | ||
33 | double phi; | ||
34 | double psi; | ||
35 | }; | ||
36 | double angle[3]; | ||
37 | }; | ||
38 | }; | ||
39 | |||
40 | #endif //endif idndef _EULER3_H_ |
Name | Value |
---|---|
svn:executable | * |