|
| Quaternion (const Quaternion< T > &other) |
|
| Quaternion (T radians, const Vector< 3, T > &axis) |
|
| Quaternion (T radians, Axis axis) |
|
| Quaternion (const T *pArray) |
|
| Quaternion (T x, T y, T z, T w) |
|
| Quaternion (const Matrix< 3, 4, T > &matrix) |
|
Quaternion< T > & | operator= (const Quaternion< T > &other) |
|
Quaternion< T > & | operator= (const Matrix< 3, 4, T > &matrix) |
|
void | computeAngleAxis (T &radians, Vector< 3, T > &axis) const |
|
|
(Note that these are not member functions.)
|
template<class T > |
Quaternion< T > & | set (Quaternion< T > &result) |
| Set the quaternion to identity. More...
|
|
template<class T , class X , class Y , class Z , class W > |
Quaternion< T > & | set (Quaternion< T > &result, X x, Y y, Z z, W w) |
| Set the components explicitly. More...
|
|
template<class T > |
Quaternion< T > & | normalize (Quaternion< T > &result) |
| Normalize all four components. More...
|
|
template<class T , class U > |
Quaternion< T > & | setAt (Quaternion< T > &lhs, U32 index, U value) |
| Set the value at the index. More...
|
|
template<class T , class U > |
Quaternion< T > & | set (Quaternion< T > &result, U radians, const Vector< 3, T > &axis) |
| Set using arbitrary angle/axis format. More...
|
|
template<class T , class U > |
Quaternion< T > & | set (Quaternion< T > &result, U radians, const Axis axis) |
| Set using angle about a specific axis. More...
|
|
template<class T > |
Quaternion< T > & | set (Quaternion< T > &result, const Vector< 3, T > &from, const Vector< 3, T > &to) |
| Set as the angle between two vectors. More...
|
|
template<class T > |
Quaternion< T > & | operator*= (Quaternion< T > &lhs, const Quaternion< T > &rhs) |
| Multiply in place. More...
|
|
template<class T , class U > |
Quaternion< T > & | operator*= (Quaternion< T > &lhs, U scale) |
| Scale in place. More...
|
|
template<class T > |
Quaternion< T > & | forcePositiveW (Quaternion< T > &lhs) |
| Negate all elements if W is negative. More...
|
|
template<class T > |
Quaternion< T > & | invert (Quaternion< T > &lhs) |
| Reverse the direction of rotation (and retain the magnitude) More...
|
|
template<class T > |
Quaternion< T > | operator- (const Quaternion< T > &lhs) |
| Return the inverse rotation. More...
|
|
template<class T > |
String | print (const Quaternion< T > &lhs) |
| Print to a string. More...
|
|
template<class T > |
bool | operator== (const Quaternion< T > &lhs, const Quaternion< T > &rhs) |
| Equality test. More...
|
|
template<class T > |
bool | equivalent (const Quaternion< T > &lhs, const Quaternion< T > &rhs, T margin) |
| Equivalence test within the given tolerance margin. More...
|
|
template<class T > |
Quaternion< T > | operator* (const Quaternion< T > &lhs, const Quaternion< T > &rhs) |
| Multiply two quaternions. More...
|
|
template<class T , class U > |
Quaternion< T > | operator* (const U &lhs, const Quaternion< T > &rhs) |
| Scale the rotation angle. More...
|
|
template<class T , class U > |
Quaternion< T > | operator* (const Quaternion< T > &lhs, const U &rhs) |
| Scale the rotation angle. More...
|
|
template<class T > |
Quaternion< T > & | nlerp (Quaternion< T > &result, const Quaternion< T > &from, const Quaternion< T > &to, T fraction) |
| Generate a rotation that in between two other rotations. More...
|
|
template<class T > |
Quaternion< T > & | slerp (Quaternion< T > &result, const Quaternion< T > &from, const Quaternion< T > &to, T fraction) |
| Generate a rotation that in between two other rotations. More...
|
|
|
| Vector (const Vector< 4, T > &other) |
|
template<typename U > |
| Vector (const Vector< 4, U > &other) |
|
| Vector (const Vector< 3, T > &other) |
|
template<typename U > |
| Vector (const Vector< 3, U > &other) |
|
| Vector (const Vector< 2, T > &other) |
|
template<typename U > |
| Vector (const Vector< 2, U > &other) |
|
| Vector (const T *array) |
|
| Vector (T x, T y, T z=T(0), T w=T(0)) |
|
Vector< 4, T > & | operator= (const Vector< 4, T > &other) |
|
template<typename U > |
Vector< 4, T > & | operator= (const Vector< 4, U > &other) |
|
Vector< 4, T > & | operator= (const Vector< 3, T > &other) |
|
template<typename U > |
Vector< 4, T > & | operator= (const Vector< 3, U > &other) |
|
Vector< 4, T > & | operator= (const Vector< 2, T > &other) |
|
template<typename U > |
Vector< 4, T > & | operator= (const Vector< 2, U > &other) |
|
Vector< 4, T > & | operator= (const T *array) |
|
const T & | operator[] (U32 index) const |
|
T & | operator[] (U32 index) |
| Access internal component. More...
|
|
Vector< 4, T > & | set4 (T x=T(0), T y=T(0), T z=T(0), T w=T(0)) |
|
void | get4 (T array[4]) |
|
const Raw | temp (void) const |
|
T | m_data [4] |
|
template<class T>
class fe::Quaternion< T >
Four-dimensional complex number.
Laid out as <x,y,z,w> using right-handed logic.
Unit quaternions are commonly used to represent rotations in 3D space. So, many of the operation presume that the quaternion is normalized and may behave poorly otherwise.
Reference: Some of the quaternion math draws from Nick Bobic's GLquat source code from his Feb 98 Game Developer article.