Stores an orientation.
More...
#include <Quaternion.hpp>
|
float | x |
|
float | y |
|
float | z |
|
float | w |
|
◆ Quaternion()
Quaternion::Quaternion |
( |
const Vec3 & |
vec, |
|
|
float |
aW |
|
) |
| |
|
inline |
◆ Conjugate()
Gets conjugate. If the quaternion is of unit length, the conjugate is the inverse.
- Returns
- Conjugate.
◆ CreateFromAxisAngle()
static Quaternion Quaternion::CreateFromAxisAngle |
( |
const Vec3 & |
axis, |
|
|
float |
angleDeg |
|
) |
| |
|
inlinestatic |
- Parameters
-
axis | Axis. Should be normalized. |
angleDeg | Angle in degrees. |
◆ FindTwist()
float Quaternion::FindTwist |
( |
const Vec3 & |
axis | ) |
const |
|
inline |
Finds twist angle around axis.
- Parameters
-
- Returns
- Twist angle (
- Todo:
- in radians? )
◆ FromAxisAngle()
void Quaternion::FromAxisAngle |
( |
const Vec3 & |
axis, |
|
|
float |
angleDeg |
|
) |
| |
|
inline |
- Parameters
-
axis | Axis. Should be normalized. |
angleDeg | Angle in degrees. |
◆ FromEuler()
void Quaternion::FromEuler |
( |
const Vec3 & |
euler | ) |
|
|
inline |
◆ FromMatrix()
void Quaternion::FromMatrix |
( |
const Matrix44 & |
mat | ) |
|
|
inline |
◆ GetAxisAngle()
void Quaternion::GetAxisAngle |
( |
Vec3 & |
outAxis, |
|
|
float & |
outAngleRad |
|
) |
| const |
|
inline |
- Parameters
-
outAxis | Axis. |
outAngleRad | in radians. |
◆ GetEuler()
Vec3 Quaternion::GetEuler |
( |
| ) |
const |
|
inline |
◆ GetMatrix()
void Quaternion::GetMatrix |
( |
Matrix44 & |
outMatrix | ) |
const |
|
inline |
Gets matrix for unit-length quaternion.
- Parameters
-
outMatrix | column-major order matrix. |
◆ operator!=()
bool Quaternion::operator!= |
( |
const Quaternion & |
q | ) |
const |
|
inline |
Inequality operator.
- Parameters
-
- Returns
- True if quaternions are not component-wise equal, false otherwise.
◆ operator*() [1/2]
Applies rotation aQ to this quaternion and returns the result.
- Returns
- This quaterion rotated by aQ.
◆ operator*() [2/2]
Vec3 Quaternion::operator* |
( |
const Vec3 & |
vec | ) |
const |
|
inline |
Multiplying a quaternion q with a vector v applies the q-rotation to vec.
- Parameters
-
- Returns
- Output vector that's rotated by this Quaternion.
◆ operator==()
bool Quaternion::operator== |
( |
const Quaternion & |
q | ) |
const |
|
inline |
Equality operator.
- Parameters
-
- Returns
- True if quaternions are component-wise equal, false otherwise.
The documentation for this class was generated from the following file: