#include <glfxvec.h>
w + i * x + j * y + k * z where: i, j, k - quaternion base
Public Member Functions | |
Quat (const float *q) | |
Quat (const Quat &q) | |
Quat (const Vec3 &v, float w) | |
Quat (float x, float y, float z, float w) | |
Quat (float f) | |
operator float * () | |
operator const float * () const | |
operator Vec4 () const | |
float & | operator[] (int n) |
Quat & | operator= (const Quat &q) |
Quat & | operator *= (const Quat &q) |
Quat & | operator *= (const float f) |
Quat & | operator+= (const Quat &q) |
Quat & | operator-= (const Quat &q) |
Vec3 & | N () |
const Vec3 & | N () const |
Vec3 | TransformVector (const Vec3 &v) const |
Public Attributes | |
float | x |
float | y |
float | z |
float | w |
Friends | |
Quat | operator * (const Quat &a, const Quat &b) |
Quat | operator * (const Quat &q, float f) |
Quat | operator * (float f, const Quat &q) |
Quat | operator+ (const Quat &a, const Quat &b) |
Quat | operator+ (const Quat &q) |
Quat | operator- (const Quat &a, const Quat &b) |
Quat | operator- (const Quat &q) |
bool | operator== (const Quat &a, const Quat &b) |
bool | operator!= (const Quat &a, const Quat &b) |
Quat | Normalize (const Quat &q) |
float | Dot (const Quat &a, const Quat &b) |
Quat | Slerp (const Quat &a, const Quat &b, float f, bool shortestPath) |
Quat | Inverse (const Quat &q) |
Quat | UnitInverse (const Quat &q) |
Quat | QuaternionFromAngleAxis (const Vec3 &axis, float angle) |
Quat | QuaternionRotationYawPitchRoll (float yaw, float pitch, float roll) |
Quat | QuaternionRotationYawPitchRoll (const Vec3 &angles) |
GLFX::Quat::Quat | ( | const float * | q | ) | [inline] |
Construct quaternion from an array of 4 floats.
GLFX::Quat::Quat | ( | const Quat & | q | ) | [inline] |
Construct quaternion from another one.
GLFX::Quat::Quat | ( | const Vec3 & | v, | |
float | w | |||
) | [inline] |
Construct quaternion from vector and scalar.
GLFX::Quat::Quat | ( | float | x, | |
float | y, | |||
float | z, | |||
float | w | |||
) | [inline] |
Construct quaternion from 4 float values.
GLFX::Quat::Quat | ( | float | f | ) | [inline] |
Construct quaternion from scalar.
GLFX::Quat::operator float * | ( | ) | [inline] |
Return array of floats.
GLFX::Quat::operator const float * | ( | ) | const [inline] |
Return array of floats.
GLFX::Quat::operator Vec4 | ( | ) | const [inline] |
Convert to 4d vector.
float & GLFX::Quat::operator[] | ( | int | n | ) | [inline] |
Get quaternion element.
Quat & GLFX::Quat::operator *= | ( | const float | f | ) | [inline] |
Multiply by scalar.
Vec3 & GLFX::Quat::N | ( | ) | [inline] |
Return 3d vector.
const Vec3 & GLFX::Quat::N | ( | ) | const [inline] |
Return 3d vector.
Interpolate quaternion.
Construct quaternion from axis and angle.
Quat QuaternionRotationYawPitchRoll | ( | float | yaw, | |
float | pitch, | |||
float | roll | |||
) | [friend] |
Construct quaternion from yaw, pitch and roll.
Construct quaternion from yaw, pitch and roll.
float GLFX::Quat::x |
x-component
float GLFX::Quat::y |
y-component
float GLFX::Quat::z |
z-component
float GLFX::Quat::w |
w-component