A rotation struct. More...

Public Member Functions | |
| Rotation () | |
| Creates an uninitialized rotation. More... | |
| Rotation (int i) | |
| Creates a rotation initialized to zero rotation. More... | |
| template<class S , class T2 , class M2 > | |
| Rotation (S a, const Vector3< T2, M2 > &v) | |
| Creates a rotation from an axis and angle. More... | |
| template<class S , class T2 , class M2 > | |
| Rotation (const Vector3< T2, M2 > &v, S a) | |
| Creates a rotation from an axis and angle. More... | |
| template<class T2 , class M2 > | |
| Rotation (const Rotation< T2, M2 > &r) | |
| Copies a rotation. More... | |
| template<class T2 , class M2 > | |
| Rotation (const Quaternion< T2, M2 > &q) | |
| Creates a rotation from a quaternion (cast). More... | |
| Rotation< T, M > & | operator= (const Rotation< T, M > &r) |
| Copy operator. More... | |
| template<class T2 , class M2 > | |
| Rotation< T, M > & | operator= (const Rotation< T2, M2 > &r) |
| Copy operator. More... | |
| T | getAngleInDegrees () const |
| Returns the angle of this rotation, in degrees. More... | |
| Vector3< T, M > | toRotationVector () const |
| Create a vector representation of the rotation. More... | |
Static Public Member Functions | |
| template<class T2 , class M2 > | |
| static Rotation< T, M > | fromRotationVector (const Vector3< T2, M2 > &v) |
| Create the rotation from a vector representation of the rotation. More... | |
Public Attributes | |
| T | a |
| Rotation angle in radians. More... | |
| Vector3< T, M > | v |
| Axis of rotation. More... | |
A rotation struct.
Use this to set glRotate. The angle is still in radians, though, so remember to convert it to degrees when applying to glRotate.
|
inline |
Creates an uninitialized rotation.
|
inlineexplicit |
Creates a rotation initialized to zero rotation.
|
inline |
Creates a rotation from an axis and angle.
|
inline |
Creates a rotation from an axis and angle.
|
inline |
Copies a rotation.
|
inlineexplicit |
Creates a rotation from a quaternion (cast).
References a3d::Rotation< T, M >::v, and a3d::Quaternion< T, M >::v.
|
inlinestatic |
Create the rotation from a vector representation of the rotation.
The vector length represents the angle, in radians, and the vector orientation represents the axis.
References a3d::Vector3< T, M >::length().

|
inline |
Returns the angle of this rotation, in degrees.
References a3d::Rotation< T, M >::a.
|
inline |
Copy operator.
References a3d::Rotation< T, M >::a, and a3d::Rotation< T, M >::v.
|
inline |
Copy operator.
References a3d::Rotation< T, M >::a, and a3d::Rotation< T, M >::v.
|
inline |
Create a vector representation of the rotation.
The vector length represents the angle, in radians, and the vector orientation represents the axis.
References a3d::Rotation< T, M >::a, and a3d::Rotation< T, M >::v.
| T a3d::Rotation< T, M >::a |
Rotation angle in radians.
Referenced by a3d::Rotation< T, M >::getAngleInDegrees(), a3d::Rotation< T, M >::operator=(), a3d::Quaternion< T, M >::Quaternion(), and a3d::Rotation< T, M >::toRotationVector().
| Vector3<T,M> a3d::Rotation< T, M >::v |
Axis of rotation.
Referenced by a3d::Rotation< T, M >::operator=(), a3d::Quaternion< T, M >::Quaternion(), a3d::Rotation< T, M >::Rotation(), and a3d::Rotation< T, M >::toRotationVector().
1.8.6