Go to the source code of this file.
Structure describing a single quaternion instance.
Constructs a modelview matrix based on a given quaternion.
- Parameters
-
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.
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.
- Parameters
-
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. |
- Returns
- Result quaternion.
Definition at line 27 of file Quaternions.cpp.
Multiplies quaternion a by b and returns the product. NOTE: quaternion multiplication is not commutative.
- Parameters
-
- Returns
- Product a*b.
Definition at line 71 of file Quaternions.cpp.