Contains the Quaternion structure with functions and overloaded operators.
More...
#include <Quaternion.h>
|
| | Quaternion () |
| | Constructs the Quaternion setting the values to 1,0,0,0. More...
|
| |
| | Quaternion (float w, float x, float y, float z) |
| | Constructs the Quaternion setting the values to the input coordinates. More...
|
| |
| | Quaternion (int w, int x, int y, int z) |
| | Constructs the Quaternion setting the values to the input coordinates. More...
|
| |
| float | getLength () |
| | Returns the length of the Quaternion. More...
|
| |
| float | getDotProduct (Quaternion Qa, Quaternion Qb) |
| | Returns the dot product of two Quaternions. More...
|
| |
| Quaternion | getNormalised () |
| | Returns the normalised version of the Quaternion. More...
|
| |
| void | rotate (Quaternion &quat, Maths::Vec3 axis, float angle) |
| | Rotates a Quaternion. More...
|
| |
| Mat4 | getMatrix () |
| | Gets a Mat4 from the Quaternion. More...
|
| |
|
| float | w |
| | the variables for the Quaternions More...
|
| |
| float | x |
| |
| float | y |
| |
| float | z |
| |
Contains the Quaternion structure with functions and overloaded operators.
◆ Quaternion() [1/3]
| Maths::Quaternion::Quaternion |
( |
| ) |
|
|
inline |
Constructs the Quaternion setting the values to 1,0,0,0.
◆ Quaternion() [2/3]
| Maths::Quaternion::Quaternion |
( |
float |
w, |
|
|
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
|
inline |
Constructs the Quaternion setting the values to the input coordinates.
- Parameters
-
| w | The inputed w position. |
| x | The inputed x position. |
| y | The inputed y position. |
| z | The inputed z position. |
◆ Quaternion() [3/3]
| Maths::Quaternion::Quaternion |
( |
int |
w, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
z |
|
) |
| |
|
inline |
Constructs the Quaternion setting the values to the input coordinates.
- Parameters
-
| w | The inputed w position. |
| x | The inputed x position. |
| y | The inputed y position. |
| z | The inputed z position. |
◆ getDotProduct()
Returns the dot product of two Quaternions.
- Parameters
-
| Qa | One of the Quaternions. |
| Qb | One of the Quaternions. |
- Returns
- The dot product of two Quaternions.
◆ getLength()
| float Maths::Quaternion::getLength |
( |
| ) |
|
|
inline |
◆ getMatrix()
| Mat4 Maths::Quaternion::getMatrix |
( |
| ) |
|
◆ getNormalised()
◆ rotate()
Rotates a Quaternion.
- Parameters
-
| quat | The Quaternion to rotate. |
| axis | The axis to rotate. |
| angle | The angle of the rotation |
- Returns
- The length of the Quaternion.
| float Maths::Quaternion::w |
the variables for the Quaternions
| float Maths::Quaternion::x |
| float Maths::Quaternion::y |
| float Maths::Quaternion::z |
The documentation for this struct was generated from the following files: