Functions | |
static void | rsQuaternionSet (rs_quaternion *q, float w, float x, float y, float z) |
static void | rsQuaternionSet (rs_quaternion *q, const rs_quaternion *rhs) |
static void | rsQuaternionMultiply (rs_quaternion *q, float s) |
static void | rsQuaternionAdd (rs_quaternion *q, const rs_quaternion *rhs) |
static void | rsQuaternionLoadRotateUnit (rs_quaternion *q, float rot, float x, float y, float z) |
static void | rsQuaternionLoadRotate (rs_quaternion *q, float rot, float x, float y, float z) |
static void | rsQuaternionConjugate (rs_quaternion *q) |
static float | rsQuaternionDot (const rs_quaternion *q0, const rs_quaternion *q1) |
static void | rsQuaternionNormalize (rs_quaternion *q) |
static void | rsQuaternionMultiply (rs_quaternion *q, const rs_quaternion *rhs) |
static void | rsQuaternionSlerp (rs_quaternion *q, const rs_quaternion *q0, const rs_quaternion *q1, float t) |
static void | rsQuaternionGetMatrixUnit (rs_matrix4x4 *m, const rs_quaternion *q) |
Quaternion routines.
Definition in file rs_quaternion.rsh.
static void rsQuaternionAdd | ( | rs_quaternion * | q, |
const rs_quaternion * | rhs | ||
) | [static] |
Add two quaternions
q | destination quaternion to add to |
rsh | right hand side quaternion to add |
Definition at line 74 of file rs_quaternion.rsh.
static void rsQuaternionConjugate | ( | rs_quaternion * | q | ) | [static] |
Conjugates the quaternion
q | quaternion to conjugate |
Definition at line 127 of file rs_quaternion.rsh.
static float rsQuaternionDot | ( | const rs_quaternion * | q0, |
const rs_quaternion * | q1 | ||
) | [static] |
Dot product of two quaternions
q0 | first quaternion |
q1 | second quaternion |
Definition at line 140 of file rs_quaternion.rsh.
static void rsQuaternionGetMatrixUnit | ( | rs_matrix4x4 * | m, |
const rs_quaternion * | q | ||
) | [static] |
Computes rotation matrix from the normalized quaternion
m | resulting matrix |
p | normalized quaternion |
Definition at line 228 of file rs_quaternion.rsh.
static void rsQuaternionLoadRotate | ( | rs_quaternion * | q, |
float | rot, | ||
float | x, | ||
float | y, | ||
float | z | ||
) | [static] |
Loads a quaternion that represents a rotation about an arbitrary vector (doesn't have to be unit)
q | quaternion to set |
rot | angle to rotate by |
x | component of a vector |
y | component of a vector |
x | component of a vector |
Definition at line 111 of file rs_quaternion.rsh.
static void rsQuaternionLoadRotateUnit | ( | rs_quaternion * | q, |
float | rot, | ||
float | x, | ||
float | y, | ||
float | z | ||
) | [static] |
Loads a quaternion that represents a rotation about an arbitrary unit vector
q | quaternion to set |
rot | angle to rotate by |
x | component of a vector |
y | component of a vector |
x | component of a vector |
Definition at line 90 of file rs_quaternion.rsh.
static void rsQuaternionMultiply | ( | rs_quaternion * | q, |
float | s | ||
) | [static] |
Multiply quaternion by a scalar
q | quaternion to multiply |
s | scalar |
Definition at line 61 of file rs_quaternion.rsh.
static void rsQuaternionMultiply | ( | rs_quaternion * | q, |
const rs_quaternion * | rhs | ||
) | [static] |
Multiply quaternion by another quaternion
q | destination quaternion |
rhs | right hand side quaternion to multiply by |
Definition at line 163 of file rs_quaternion.rsh.
static void rsQuaternionNormalize | ( | rs_quaternion * | q | ) | [static] |
Normalizes the quaternion
q | quaternion to normalize |
Definition at line 149 of file rs_quaternion.rsh.
static void rsQuaternionSet | ( | rs_quaternion * | q, |
float | w, | ||
float | x, | ||
float | y, | ||
float | z | ||
) | [static] |
Set the quaternion components
w | component |
x | component |
y | component |
z | component |
Definition at line 35 of file rs_quaternion.rsh.
static void rsQuaternionSet | ( | rs_quaternion * | q, |
const rs_quaternion * | rhs | ||
) | [static] |
Set the quaternion from another quaternion
q | destination quaternion |
rhs | source quaternion |
Definition at line 48 of file rs_quaternion.rsh.
static void rsQuaternionSlerp | ( | rs_quaternion * | q, |
const rs_quaternion * | q0, | ||
const rs_quaternion * | q1, | ||
float | t | ||
) | [static] |
Performs spherical linear interpolation between two quaternions
q | result quaternion from interpolation |
q0 | first param |
q1 | second param |
t | how much to interpolate by |
Definition at line 182 of file rs_quaternion.rsh.