Create and play with a Quaternion.
More...
#include <alquaternion.h>
|
float | w |
|
float | x |
|
float | y |
|
float | z |
|
Create and play with a Quaternion.
A Quaternion is just defined by w, x, y and z.
Definition at line 24 of file alquaternion.h.
AL::Math::Quaternion::Quaternion |
( |
| ) |
|
AL::Math::Quaternion::Quaternion |
( |
float |
pW, |
|
|
float |
pX, |
|
|
float |
pY, |
|
|
float |
pZ |
|
) |
| |
Create a Quaternion initialize with explicit value.
- Parameters
-
pW | the float value for w |
pX | the float value for x |
pY | the float value for y |
pZ | the float value for z |
AL::Math::Quaternion::Quaternion |
( |
const std::vector< float > & |
pFloats | ) |
|
Create a Quaternion with an std::vector.
- Parameters
-
pFloats | An std::vector<float> of size 4 for respectively: w, x, y and z |
static Quaternion AL::Math::Quaternion::fromAngleAndAxisRotation |
( |
const float |
pAngle, |
|
|
const float |
pAxisX, |
|
|
const float |
pAxisY, |
|
|
const float |
pAxisZ |
|
) |
| |
|
static |
Create a Quaternion initialized with explicit angle and axis rotation.
- Parameters
-
pAngle | the float value for angle in radian around axis rotation |
pAxisX | the float value for x value of axis rotation |
pAxisY | the float value for y value of axis rotation |
pAxisZ | the float value for z value of axis rotation |
Quaternion AL::Math::Quaternion::inverse |
( |
| ) |
const |
bool AL::Math::Quaternion::isNear |
( |
const Quaternion & |
pQua2, |
|
|
const float & |
pEpsilon = 0.0001f |
|
) |
| const |
Check if the actual Quaternion is near the one give in argument.
- Parameters
-
pQua2 | the second Quaternion |
pEpsilon | an optionnal epsilon distance |
- Returns
- true if the distance between the two Quaternion is less than pEpsilon Check if |Qua1+Qua2| < epsilon or |Qua1-Qua2| < epsilon
float AL::Math::Quaternion::norm |
( |
| ) |
const |
Quaternion AL::Math::Quaternion::normalize |
( |
| ) |
const |
Normalize the actual Quaterion.
- Returns
- the Quaternion normalized
bool AL::Math::Quaternion::operator!= |
( |
const Quaternion & |
pQua2 | ) |
const |
Overloading of operator != for Quaternion.
- Parameters
-
Quaternion AL::Math::Quaternion::operator* |
( |
float |
pVal | ) |
const |
|
inline |
Overloading of operator *= for Quaternion.
- Parameters
-
Quaternion& AL::Math::Quaternion::operator*= |
( |
float |
pVal | ) |
|
Overloading of operator *= for Quaternion.
- Parameters
-
Quaternion AL::Math::Quaternion::operator/ |
( |
float |
pVal | ) |
const |
Overloading of operator / for Quaternion.
- Parameters
-
Quaternion& AL::Math::Quaternion::operator/= |
( |
float |
pVal | ) |
|
Overloading of operator /= for Quaternion.
- Parameters
-
bool AL::Math::Quaternion::operator== |
( |
const Quaternion & |
pQua2 | ) |
const |
Overloading of operator == for Quaternion.
- Parameters
-
void AL::Math::Quaternion::toVector |
( |
std::vector< float > & |
pReturnVector | ) |
const |
Return the Quaternion as a vector of float [w, x, y, z].
std::vector<float> AL::Math::Quaternion::toVector |
( |
void |
| ) |
const |
float AL::Math::Quaternion::w |
float AL::Math::Quaternion::x |
float AL::Math::Quaternion::y |
float AL::Math::Quaternion::z |
The documentation for this struct was generated from the following file:
- /home/opennao/work/release-2.8/lib/libalmath/almath/types/alquaternion.h