|
Aeon Engine c550894
AeonGames Open Source Game Engine
|
Quaternion class. More...
#include <aeongames/Quaternion.hpp>

Public Member Functions | |
| DLL | Quaternion () |
| Default constructor. | |
| DLL | Quaternion (float w, float x, float y, float z) |
| Construct a quaternion from individual components. | |
| DLL | Quaternion (const float *aData) |
| Construct a quaternion from a float array. | |
| DLL void | Get (float *aData) const |
| Copy the quaternion components to a float array. | |
| DLL | ~Quaternion () |
| destructor. | |
| DLL Matrix4x4 | GetMatrix4x4 () const |
| Convert the quaternion to a 4x4 rotation matrix. | |
| DLL Matrix3x3 | GetMatrix3x3 () const |
| Convert the quaternion to a 3x3 rotation matrix. | |
Operators | |
| DLL Quaternion & | operator= (const float *aLhs) |
| Assign from a raw float array. | |
| DLL Quaternion & | operator*= (const Quaternion &lhs) |
| Multiply this quaternion by another quaternion. | |
| DLL float | operator[] (const size_t aIndex) const |
| Access a quaternion component by index (const). | |
| DLL float & | operator[] (const size_t aIndex) |
| Access a quaternion component by index. | |
| DLL Quaternion & | Normalize () |
| Normalize this quaternion in place. | |
| DLL Vector3 | GetEuler () const |
| Get the Euler angle representation of this quaternion. | |
| DLL Quaternion & | SetEuler (const Vector3 &aEuler) |
| Set the quaternion from Euler angles. | |
| static DLL const Quaternion | GetFromAxisAngle (float angle, float x, float y, float z) |
| Create a quaternion from an axis-angle representation. | |
| static DLL const Quaternion | GetFromEuler (const Vector3 &aEuler) |
| Create a quaternion from Euler angles. | |
Quaternion class.
Definition at line 33 of file Quaternion.hpp.
| AeonGames::Quaternion::Quaternion | ( | float | w, |
| float | x, | ||
| float | y, | ||
| float | z ) |
Construct a quaternion from individual components.
| w | The scalar (real) component. |
| x | The X imaginary component. |
| y | The Y imaginary component. |
| z | The Z imaginary component. |
Definition at line 28 of file Quaternion.cpp.
| AeonGames::Quaternion::Quaternion | ( | const float * | aData | ) |
Construct a quaternion from a float array.
| aData | Pointer to an array of at least 4 floats in W, X, Y, Z order. |
Definition at line 33 of file Quaternion.cpp.
| void AeonGames::Quaternion::Get | ( | float * | aData | ) | const |
Copy the quaternion components to a float array.
| aData | Pointer to an array of at least 4 floats to receive W, X, Y, Z values. |
Definition at line 265 of file Quaternion.cpp.
| Vector3 AeonGames::Quaternion::GetEuler | ( | ) | const |
Get the Euler angle representation of this quaternion.
Definition at line 270 of file Quaternion.cpp.
|
static |
Create a quaternion from an axis-angle representation.
| angle | Angle in degrees of rotation. |
| x | X component of the axis of rotation. |
| y | Y component of the axis of rotation. |
| z | Z component of the axis of rotation. |
Definition at line 228 of file Quaternion.cpp.
|
static |
Create a quaternion from Euler angles.
| aEuler | A vector containing Euler angles in degrees. |
Definition at line 241 of file Quaternion.cpp.
| Matrix3x3 AeonGames::Quaternion::GetMatrix3x3 | ( | ) | const |
Convert the quaternion to a 3x3 rotation matrix.
Definition at line 77 of file Quaternion.cpp.
| Matrix4x4 AeonGames::Quaternion::GetMatrix4x4 | ( | ) | const |
Convert the quaternion to a 4x4 rotation matrix.
Definition at line 40 of file Quaternion.cpp.
| Quaternion & AeonGames::Quaternion::Normalize | ( | ) |
Normalize this quaternion in place.
Definition at line 246 of file Quaternion.cpp.
| Quaternion & AeonGames::Quaternion::operator*= | ( | const Quaternion & | lhs | ) |
Multiply this quaternion by another quaternion.
Definition at line 116 of file Quaternion.cpp.
| Quaternion & AeonGames::Quaternion::operator= | ( | const float * | aLhs | ) |
Assign from a raw float array.
Definition at line 110 of file Quaternion.cpp.
| float & AeonGames::Quaternion::operator[] | ( | const size_t | aIndex | ) |
Access a quaternion component by index.
Definition at line 222 of file Quaternion.cpp.
| float AeonGames::Quaternion::operator[] | ( | const size_t | aIndex | ) | const |
Access a quaternion component by index (const).
Definition at line 216 of file Quaternion.cpp.
| Quaternion & AeonGames::Quaternion::SetEuler | ( | const Vector3 & | aEuler | ) |
Set the quaternion from Euler angles.
| aEuler | A vector containing the Euler angles in degrees. |
Definition at line 300 of file Quaternion.cpp.