Stores an orientation.
More...
#include <Quaternion.hpp>
|
| float | x |
| |
| float | y |
| |
| float | z |
| |
| float | w |
| |
| ae3d::Quaternion::Quaternion |
( |
const Vec3 & |
vec, |
|
|
float |
aW |
|
) |
| |
|
inline |
Gets conjugate. If the quaternion is of unit length, the conjugate is the inverse.
- Returns
- Conjugate.
| static Quaternion ae3d::Quaternion::CreateFromAxisAngle |
( |
const Vec3 & |
axis, |
|
|
float |
angleDeg |
|
) |
| |
|
inlinestatic |
- Parameters
-
| axis | Axis. Should be normalized. |
| angleDeg | Angle in degrees. |
| float ae3d::Quaternion::FindTwist |
( |
const Vec3 & |
axis | ) |
const |
|
inline |
Finds twist angle around axis.
- Parameters
-
- Returns
- Twist angle (
- Todo:
- in radians? )
| void ae3d::Quaternion::FromAxisAngle |
( |
const Vec3 & |
axis, |
|
|
float |
angleDeg |
|
) |
| |
|
inline |
- Parameters
-
| axis | Axis. Should be normalized. |
| angleDeg | Angle in degrees. |
- Parameters
-
| euler | Euler angles in degrees. |
- Returns
- Quaternion created from euler.
| void ae3d::Quaternion::FromMatrix |
( |
const Matrix44 & |
mat | ) |
|
|
inline |
| void ae3d::Quaternion::GetAxisAngle |
( |
Vec3 & |
outAxis, |
|
|
float & |
outAngleRad |
|
) |
| const |
|
inline |
- Parameters
-
| outAxis | Axis. |
| outAngleRad | in radians. |
| Vec3 ae3d::Quaternion::GetEuler |
( |
| ) |
const |
|
inline |
| void ae3d::Quaternion::GetMatrix |
( |
Matrix44 & |
outMatrix | ) |
const |
|
inline |
Gets matrix for unit-length quaternion.
- Parameters
-
| outMatrix | column-major order matrix. |
| void ae3d::Quaternion::Normalize |
( |
| ) |
|
|
inline |
Normalizes the quaternion if it's not near unit-length already.
| bool ae3d::Quaternion::operator!= |
( |
const Quaternion & |
q | ) |
const |
|
inline |
Inequality operator.
- Parameters
-
- Returns
- True if quaternions are not component-wise equal, false otherwise.
| Vec3 ae3d::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.
Applies rotation aQ to this quaternion and returns the result.
- Returns
- This quaterion rotated by aQ.
| bool ae3d::Quaternion::operator== |
( |
const Quaternion & |
q | ) |
const |
|
inline |
Equality operator.
- Parameters
-
- Returns
- True if quaternions are component-wise equal, false otherwise.
| float ae3d::Quaternion::w |
| float ae3d::Quaternion::x |
| float ae3d::Quaternion::y |
| float ae3d::Quaternion::z |
The documentation for this struct was generated from the following file: