vtdata library
|
Public Member Functions | |
FQuat (float qx, float qy, float qz, float qw) | |
FQuat (const FQuat &q) | |
FQuat (const FPoint3 &axis, float angle) | |
void | Init () |
void | Set (float qx, float qy, float qz, float qw) |
void | SetFromMatrix (const FMatrix3 &matrix) |
void | SetFromVectors (const FPoint3 &forward, const FPoint3 &up) |
void | SetFromVector (const FPoint3 &direction) |
void | AxisAngle (const FPoint3 &axis, float angle) |
void | GetMatrix (FMatrix3 &matrix) const |
void | Slerp (const FQuat &from, const FQuat &to, double f) |
float | LengthSquared () const |
const FQuat | Inverse () const |
void | Invert () |
const FQuat | operator* (const FQuat &q) const |
FQuat & | operator*= (const FQuat &q) |
const FQuat | operator/ (const FQuat &q) const |
FQuat & | operator/= (const FQuat &q) |
FQuat & | operator= (const FQuat &q) |
Public Attributes | |
float | x |
float | y |
float | z |
float | w |
Single-precision quaternion class. Quaternions are very useful for efficiently representing an orientations/rotation and operations such as interpolating between orientations.
void FQuat::GetMatrix | ( | FMatrix3 & | mat | ) | const |
Get the equivalent matrix for this quaternion.
void FQuat::SetFromMatrix | ( | const FMatrix3 & | mat | ) |
Set quaternion to be equivalent to specified matrix.
Spherical Linear Interpolation. As f goes from 0 to 1, the quaternion goes from "from" to "to".
Reference: Shoemake at SIGGRAPH 89, See also: http://www.gamasutra.com/features/19980703/quaternions_01.htm