This class represents a quaternion used for 3D rotations.
More...
#include <Math3D.h>
|
| Quaternion (float w=1, float x=0, float y=0, float z=0) |
| Creates a new quaternion.
|
|
const float & | w () const |
| Retrieves the w component of the quarternion.
|
|
const float & | x () const |
| Retrieves the x component of the quarternion.
|
|
const float & | y () const |
| Retrieves the y component of the quarternion.
|
|
const float & | z () const |
| Retrieves the z component of the quarternion.
|
|
void | get (float *destination) const |
| Retrieves the components of the vector.
|
|
float * | get () |
| Retrieves the components of the vector.
|
|
const float * | get () const |
| Retrieves the components of the vector.
|
|
Vector3 | getLookAt () const |
| When the quaternion represents an orientation, this returns the negative z axis vector.
|
|
Vector3 | getUp () const |
| When the quaternion represents an orientation, this returns the y axis vector.
|
|
This class represents a quaternion used for 3D rotations.
◆ Quaternion()
Quaternion::Quaternion |
( |
float | w = 1, |
|
|
float | x = 0, |
|
|
float | y = 0, |
|
|
float | z = 0 ) |
|
inline |
Creates a new quaternion.
- Parameters
-
w | The w component. |
x | The x component. |
y | The y component. |
z | The z component. |
◆ get() [1/3]
float * Quaternion::get |
( |
| ) |
|
|
inline |
Retrieves the components of the vector.
- Returns
- The components as float[4].
◆ get() [2/3]
const float * Quaternion::get |
( |
| ) |
const |
|
inline |
Retrieves the components of the vector.
- Returns
- The components as float[4].
◆ get() [3/3]
void Quaternion::get |
( |
float * | destination | ) |
const |
|
inline |
Retrieves the components of the vector.
- Parameters
-
destination | Where the 4 float values should be saved to. |
◆ getLookAt()
Vector3 Quaternion::getLookAt |
( |
| ) |
const |
|
inline |
When the quaternion represents an orientation, this returns the negative z axis vector.
- Returns
- The negative z axis vector.
◆ getUp()
Vector3 Quaternion::getUp |
( |
| ) |
const |
|
inline |
When the quaternion represents an orientation, this returns the y axis vector.
- Returns
- The y axis vector.
◆ w()
const float & Quaternion::w |
( |
| ) |
const |
|
inline |
Retrieves the w component of the quarternion.
- Returns
- The w component.
◆ x()
const float & Quaternion::x |
( |
| ) |
const |
|
inline |
Retrieves the x component of the quarternion.
- Returns
- The x component.
◆ y()
const float & Quaternion::y |
( |
| ) |
const |
|
inline |
Retrieves the y component of the quarternion.
- Returns
- The y component.
◆ z()
const float & Quaternion::z |
( |
| ) |
const |
|
inline |
Retrieves the z component of the quarternion.
- Returns
- The z component.
The documentation for this class was generated from the following file: