#include <EulerAngle.h>
Collaboration diagram for gmtl::EulerAngle:

Public Types | |
| enum | Params { Size = 3, Order = ROTATION_ORDER::ID } |
Public Methods | |
| EulerAngle () | |
| default constructor. More... | |
| EulerAngle (const EulerAngle &e) | |
| copy constructor. More... | |
| EulerAngle (DATA_TYPE p0, DATA_TYPE p1, DATA_TYPE p2) | |
| data constructor. More... | |
| void | set (const DATA_TYPE &p0, const DATA_TYPE &p1, const DATA_TYPE &p2) |
| set data. More... | |
| DATA_TYPE & | operator[] (const unsigned i) |
| Gets the ith component in this EulerAngle. More... | |
| const DATA_TYPE & | operator[] (const unsigned i) const |
| Gets the ith component in this EulerAngle. More... | |
| DATA_TYPE * | getData () |
| Gets the internal array of the components. More... | |
| const DATA_TYPE * | getData () const |
| Gets the internal array of the components (const version). More... | |
Euler angle can be used to represent rotations in 3-space.
To some people this rotation format can be more intuitive to specify than Matrix, Quat, or AxisAngle formatted rotation.
For efficiency and to minimize problems from gimbal-lock, you should use one of the other rotation formats instead (Quat or Matrix are preferred).
The internal data format is an array of 3 DATA_TYPE angle values, plus a RotationOrder that specifies how to build a rotation transform from the 3 angle value.
IMPORTANT: The 3 angles are in the order set getOrder(), not XYZ. The values do not swap when order is changed after setting the angles.
Definition at line 67 of file EulerAngle.h.
|
|||||
|
Definition at line 70 of file EulerAngle.h.
|
|
|||||||||
|
default constructor. initializes to identity rotation (no rotation). Definition at line 73 of file EulerAngle.h. References gmtlASSERT. Referenced by EulerAngle.
00074 {
00075 gmtlASSERT( ROTATION_ORDER::IS_ROTORDER == 1 &&
00076 "you must specify a RotationOrder derived type for the rotationorder in euler angle." );
00077 mData[0] = DATA_TYPE( 0 );
00078 mData[1] = DATA_TYPE( 0 );
00079 mData[2] = DATA_TYPE( 0 );
00080 }
|
|
||||||||||
|
copy constructor.
Definition at line 83 of file EulerAngle.h. References EulerAngle.
00084 {
00085 mData[0] = e.mData[0];
00086 mData[1] = e.mData[1];
00087 mData[2] = e.mData[2];
00088 }
|
|
||||||||||||||||||||
|
data constructor. angles are in radians. Definition at line 91 of file EulerAngle.h.
00092 {
00093 mData[0] = p0;
00094 mData[1] = p1;
00095 mData[2] = p2;
00096 }
|
|
|||||||||
|
Gets the internal array of the components (const version).
Definition at line 134 of file EulerAngle.h.
00134 { return mData; }
|
|
|||||||||
|
Gets the internal array of the components.
Definition at line 129 of file EulerAngle.h.
00129 { return mData; }
|
|
||||||||||
|
Gets the ith component in this EulerAngle.
Definition at line 118 of file EulerAngle.h. References gmtlASSERT, and Size.
00119 {
00120 gmtlASSERT( i < Size );
00121 return mData[i];
00122 }
|
|
||||||||||
|
Gets the ith component in this EulerAngle.
Definition at line 113 of file EulerAngle.h. References gmtlASSERT, and Size.
00114 {
00115 gmtlASSERT( i < Size );
00116 return mData[i];
00117 }
|
|
||||||||||||||||||||
|
set data. angles are in radians. Definition at line 99 of file EulerAngle.h.
00101 {
00102 mData[0] = p0;
00103 mData[1] = p1;
00104 mData[2] = p2;
00105 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002