#include <rtcRotation.h>
Public Member Functions | |
void | apply (Vec3< T > &v) const |
Helper for applying the rotation to points: Rotation * Vec. | |
Vec3< T > | apply (const Vec3< T > &v) const |
Rotation () | |
Constructor. | |
Rotation (const T x11, const T x12, const T x13, const T x21, const T x22, const T x23, const T x31, const T x32, const T x33) | |
Rotation (const Mat< T, 3, 3 > &m) | |
Rotation (const Quaternion< T > &q) | |
Rotation (const EulerAngles< T > &e) | |
template<class U > | |
Rotation (const Mat< U, 3, 3 > &m) | |
Casting Operation. | |
void | set (const Quaternion< T > &q) |
Mutators. | |
void | set (const EulerAngles< T > &e) |
void | set (const T theta, const T phi) |
The Rotation Matrix Class
Defines rotation matrix class that derives from SMat<T,3> and knows how to construct itself from several other common rotation representations, such as quaternions, axis angles, and euler angles.
A coordinate rotation is a rotation about a single coordinate axis. Enumerating the x-, y-, and z-axes with 1,2, and 3, the coordinate rotations are:
A matrix representing the end result of all three rotations is formed by successive multiplication of the matrices representing the three simple rotations, as in the equation
Definition at line 75 of file rtcRotation.h.
rtc::Rotation< T >::Rotation | ( | ) | [inline] |
Constructor.
Ctor that intializes to an identity rotation matrix.
Definition at line 116 of file rtcRotation.h.
rtc::Rotation< T >::Rotation | ( | const T | x11, |
const T | x12, | ||
const T | x13, | ||
const T | x21, | ||
const T | x22, | ||
const T | x23, | ||
const T | x31, | ||
const T | x32, | ||
const T | x33 | ||
) | [inline] |
Ctor that initializes matrix entries directly.
Definition at line 124 of file rtcRotation.h.
rtc::Rotation< T >::Rotation | ( | const Mat< T, 3, 3 > & | m | ) | [inline] |
Ctor that initializes from Mat<T,3,3>.
Definition at line 135 of file rtcRotation.h.
rtc::Rotation< T >::Rotation | ( | const Quaternion< T > & | q | ) | [inline] |
Ctor that builds a rotation matrix from a quaternion Precondition: quaternion must have unit norm for matrix to have unit norm
Definition at line 141 of file rtcRotation.h.
rtc::Rotation< T >::Rotation | ( | const EulerAngles< T > & | e | ) | [inline] |
Ctor that builds a rotation matrix from euler angles
Definition at line 148 of file rtcRotation.h.
rtc::Rotation< T >::Rotation | ( | const Mat< U, 3, 3 > & | m | ) | [inline] |
Casting Operation.
Casting Ctor that initializes from a Mat<U,3,3> with type cast
Definition at line 155 of file rtcRotation.h.
void rtc::Rotation< T >::apply | ( | Vec3< T > & | v | ) | const [inline] |
Vec3< T > rtc::Rotation< T >::apply | ( | const Vec3< T > & | v | ) | const [inline] |
Helper for applying the rotation to points: Rotation * Vec3
Definition at line 211 of file rtcRotation.h.
void rtc::Rotation< T >::set | ( | const Quaternion< T > & | q | ) | [inline] |
Mutators.
Set the rotation matrix according to passed quaternion Precondition: quaternion must have unit norm for matrix to have unit norm
Definition at line 163 of file rtcRotation.h.
void rtc::Rotation< T >::set | ( | const EulerAngles< T > & | e | ) | [inline] |
Set the rotation matrix according to passed euler angles
Definition at line 178 of file rtcRotation.h.
void rtc::Rotation< T >::set | ( | const T | theta, |
const T | phi | ||
) | [inline] |
Set the rotation matrix according to passed 2 angles
Definition at line 196 of file rtcRotation.h.