OpenGL ES SDK for Android
ARM Developer Center
|
Go to the source code of this file.
Functions | |
Quaternion | construct_quaternion (float x, float y, float z, float degs) |
void | construct_modelview_matrix (Quaternion quaternion, float *mat) |
Quaternion | multiply_quaternions (Quaternion a, Quaternion b) |
void construct_modelview_matrix | ( | Quaternion | quaternion, |
float * | mat | ||
) |
Constructs a modelview matrix based on a given quaternion.
quaternion | Quaternion describing rotation angle and vector to be used for matrix creation. |
mat | Array to store a modelview matrix. Cannot be NULL. |
Definition at line 43 of file Quaternions.cpp.
Quaternion construct_quaternion | ( | float | x, |
float | y, | ||
float | z, | ||
float | degs | ||
) |
Function that returns a new quaternion. It inserts the angle in the real part and the vector in the vector part, yielding a quaternion that represents a rotation around the axis.
x | X coordinate of a vector defining a rotation axis. |
y | Y coordinate of a vector defining a rotation axis. |
z | Z coordinate of a vector defining a rotation axis. |
degs | Rotation in degrees. |
Definition at line 27 of file Quaternions.cpp.
Quaternion multiply_quaternions | ( | Quaternion | a, |
Quaternion | b | ||
) |
Multiplies quaternion a by b and returns the product. NOTE: quaternion multiplication is not commutative.
a | Quaternion a. |
b | Quaternion b. |
Definition at line 71 of file Quaternions.cpp.