v0.1.8
|
Quaternion. More...
#include <Quaternion.hpp>
Public Member Functions | |
QuaternionT (const Vector3T< Type > &euler) | |
QuaternionT (Type w, Type x, Type y, Type z) | |
QuaternionT< Type > & | operator* (const QuaternionT< Type > &operand) const |
QuaternionT< Type > & | operator*= (const QuaternionT< Type > &operand) |
QuaternionT< Type > & | operator* (Type operand) const |
QuaternionT< Type > & | operator*= (Type operand) |
QuaternionT< Type > & | operator+ (const QuaternionT< Type > &operand) const |
QuaternionT< Type > & | operator+= (const QuaternionT< Type > &operand) |
QuaternionT< Type > & | operator- (const QuaternionT< Type > &operand) const |
QuaternionT< Type > & | operator-= (const QuaternionT< Type > &operand) |
void | Normalize () |
Normalizes the quaternion. More... | |
void | RotateOnAxis (const Vector3T< Type > &axis, Type angle) |
void | Set (Type w, Type x, Type y, Type z) |
void | FromEuler (const Vector3T< Type > &euler) |
Vector3T< Type > | ToEuler () |
Static Public Member Functions | |
static QuaternionT< Type > | Lerp (const QuaternionT &from, const QuaternionT &to, Type t) |
Performs linear interpolation on a quaternion and normalizes it. | |
Public Attributes | |
Type | w |
The w component. | |
Type | x |
The x component. | |
Type | y |
The y component. | |
Type | z |
The z component. | |
void CGUL::QuaternionT< Type >::Normalize | ( | ) |
Normalizes the quaternion.
In theory, a quaternion should always be normalized. Due to floating point inconsistencies, quaternions are hardly ever normalized. It is imperative that a quaternion be normalized regularly. Ideally, you would normalize a quaternion once per tick.