Create and play with a Quaternion.
More...
#include <alquaternion.h>
List of all members.
Public Member Functions |
| | Quaternion () |
| | Create a Quaternion initialize with 0.0f.
|
| | Quaternion (float pW, float pX, float pY, float pZ) |
| | Create a Quaternion initialize with explicit value.
|
| | Quaternion (const std::vector< float > &pFloats) |
| | Create a Quaternion with an std::vector.
|
| Quaternion & | operator*= (const Quaternion &pQu2) |
| | Overloading of operator *= for Quaternion.
|
| Quaternion | operator* (const Quaternion &pQua2) const |
| | Overloading of operator * for Quaternion.
|
| bool | operator== (const Quaternion &pQua2) const |
| | Overloading of operator == for Quaternion.
|
| bool | operator!= (const Quaternion &pQua2) const |
| | Overloading of operator != for Quaternion.
|
| Quaternion & | operator*= (float pVal) |
| | Overloading of operator *= for Quaternion.
|
| Quaternion & | operator/= (float pVal) |
| | Overloading of operator /= for Quaternion.
|
| bool | isNear (const Quaternion &pQua2, const float &pEpsilon=0.0001f) const |
| | Check if the actual Quaternion is near the one give in argument.
|
| float | norm () const |
| | Compute the norm of the actual Quaternion.
|
| Quaternion | normalize () const |
| | Normalize the actual Quaterion.
|
| Quaternion | inverse () const |
| | Compute the quaternion inverse of the actual Quaternion.
|
| std::vector< float > | toVector () const |
| | Return the Quaternion as a vector of float [w, x, y, z].
|
Static Public Member Functions |
| static Quaternion | fromAngleAndAxisRotation (const float pAngle, const float pAxisX, const float pAxisY, const float pAxisZ) |
| | Create a Quaternion initialized with explicit angle and axis rotation.
|
Public Attributes |
| float | w |
| float | x |
| float | y |
| float | z |
Detailed Description
Create and play with a Quaternion.
A Quaternion is just defined by w, x, y and z.
Definition at line 23 of file alquaternion.h.
Constructor & Destructor Documentation
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 |
Create a Quaternion with an std::vector.
- Parameters:
-
| pFloats | An std::vector<float> of size 4 for respectively: w, x, y and z |
Member Function Documentation
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 |
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
Normalize the actual Quaterion.

- Returns:
- the Quaternion normalized
| bool AL::Math::Quaternion::operator!= |
( |
const Quaternion & |
pQua2 | ) |
const |
Overloading of operator != for Quaternion.
- Parameters:
-
Overloading of operator * for Quaternion.
- Parameters:
-
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 | ) |
|
Overloading of operator /= for Quaternion.
- Parameters:
-
| bool AL::Math::Quaternion::operator== |
( |
const Quaternion & |
pQua2 | ) |
const |
Overloading of operator == for Quaternion.
- Parameters:
-
Return the Quaternion as a vector of float [w, x, y, z].
Member Data Documentation
The documentation for this struct was generated from the following file: