A 3*3 rotation matrix. More...
#include <alrotation.h>
Public Member Functions | |
| Rotation () | |
| Create a Rotation initialized to identity. | |
| Rotation (const std::vector< float > &pFloats) | |
| Create a Rotation with an std::vector. | |
| Rotation & | operator*= (const Rotation &pRot2) |
| Overloading of operator *= for Rotation. | |
| Rotation | operator* (const Rotation &pRot2) const |
| Overloading of operator * for Rotation. | |
| bool | operator== (const Rotation &pRot2) const |
| Overloading of operator == for Rotation. | |
| bool | operator!= (const Rotation &pRot2) const |
| Overloading of operator != for Rotation. | |
| bool | isNear (const Rotation &pRot2, const float &pEpsilon=0.0001f) const |
| Check if the actual Rotation is near the one give in argument. | |
| Rotation | transpose () const |
| Compute the rotation transpose (inverse) of the actual Rotation: | |
| float | determinant () const |
| Compute the determinant of the Rotation: | |
| std::vector< float > | toVector () const |
| Return the Rotation as a vector of float: | |
Static Public Member Functions | |
| static Rotation | fromQuaternion (const float pA, const float pB, const float pC, const float pD) |
| Creates a 3*3 Rotation Matrix from a normalized quaternion ( |a + bi + cj + dk| = 1). | |
| static Rotation | fromAngleDirection (const float pAngle, const float pX, const float pY, const float pZ) |
| Creates a 3*3 Rotation Matrix from a an angle and a normalized direction( |pX, pY, pZ| = 1). | |
| static Rotation | fromRotX (const float pRotX) |
| Create a Rotation initialized with explicit rotation around x axis. | |
| static Rotation | fromRotY (const float pRotY) |
| Create a Rotation initialized with explicit rotation around y axis. | |
| static Rotation | fromRotZ (const float pRotZ) |
| Create a Rotation initialized with explicit rotation around z axis. | |
| static Rotation | from3DRotation (const float &pWX, const float &pWY, const float &pWZ) |
| Create a Rotation initialized with euler angle. | |
Public Attributes | |
| float | r1_c1 |
| row 1 column 1. | |
| float | r1_c2 |
| row 1 column 2. | |
| float | r1_c3 |
| row 1 column 3. | |
| float | r2_c1 |
| row 2 column 1. | |
| float | r2_c2 |
| row 2 column 2. | |
| float | r2_c3 |
| row 2 column 3. | |
| float | r3_c1 |
| row 3 column 1. | |
| float | r3_c2 |
| row 3 column 2. | |
| float | r3_c3 |
| row 3 column 3. | |
Create a Rotation initialized to identity.
| AL::Math::Rotation::Rotation | ( | const std::vector< float > & | pFloats | ) |
Create a Rotation with an std::vector.
| pFloats | An std::vector<float> of size 9, 12 or 16 for respectively: |
For std::vector<float> of size 9
For std::vector<float> of size 12 or 16:
| float AL::Math::Rotation::determinant | ( | ) | const |
| static Rotation AL::Math::Rotation::from3DRotation | ( | const float & | pWX, |
| const float & | pWY, | ||
| const float & | pWZ | ||
| ) | [static] |
Create a Rotation initialized with euler angle.
Rot = fromRotZ(pWZ)*fromRotY(pWY)*fromRotX(pWX)
| pWX | the float value for euler angle x in radian |
| pWY | the float value for euler angle y in radian |
| pWZ | the float value for euler angle z in radian |
| static Rotation AL::Math::Rotation::fromAngleDirection | ( | const float | pAngle, |
| const float | pX, | ||
| const float | pY, | ||
| const float | pZ | ||
| ) | [static] |
Creates a 3*3 Rotation Matrix from a an angle and a normalized direction( |pX, pY, pZ| = 1).
| pAngle | the float value of angle in radian |
| pX | the X direction of the vector of the rotation |
| pY | the Y direction of the vector of the rotation |
| pZ | the Z direction of the vector of the rotation |
| static Rotation AL::Math::Rotation::fromQuaternion | ( | const float | pA, |
| const float | pB, | ||
| const float | pC, | ||
| const float | pD | ||
| ) | [static] |
Creates a 3*3 Rotation Matrix from a normalized quaternion ( |a + bi + cj + dk| = 1).
| pA | Coefficient a of the normalized quaternion |
| pB | Coefficient b of the normalized quaternion |
| pC | Coefficient c of the normalized quaternion |
| pD | Coefficient d of the normalized quaternion |
| static Rotation AL::Math::Rotation::fromRotX | ( | const float | pRotX | ) | [static] |
Create a Rotation initialized with explicit rotation around x axis.
| pRotX | the float value for angle rotation in radian around x axis |
| static Rotation AL::Math::Rotation::fromRotY | ( | const float | pRotY | ) | [static] |
Create a Rotation initialized with explicit rotation around y axis.
| pRotY | the float value for angle rotation in radian around y axis |
| static Rotation AL::Math::Rotation::fromRotZ | ( | const float | pRotZ | ) | [static] |
Create a Rotation initialized with explicit rotation around z axis.
| pRotZ | the float value for angle rotation in radian around z axis |
| bool AL::Math::Rotation::isNear | ( | const Rotation & | pRot2, |
| const float & | pEpsilon = 0.0001f |
||
| ) | const |
| bool AL::Math::Rotation::operator!= | ( | const Rotation & | pRot2 | ) | const |
| bool AL::Math::Rotation::operator== | ( | const Rotation & | pRot2 | ) | const |
| std::vector<float> AL::Math::Rotation::toVector | ( | ) | const |
Return the Rotation as a vector of float:
| Rotation AL::Math::Rotation::transpose | ( | ) | const |
row 1 column 1.
Definition at line 35 of file alrotation.h.
row 1 column 2.
Definition at line 39 of file alrotation.h.
row 1 column 3.
Definition at line 43 of file alrotation.h.
row 2 column 1.
Definition at line 47 of file alrotation.h.
row 2 column 2.
Definition at line 51 of file alrotation.h.
row 2 column 3.
Definition at line 55 of file alrotation.h.
row 3 column 1.
Definition at line 59 of file alrotation.h.
row 3 column 2.
Definition at line 63 of file alrotation.h.
row 3 column 3.
Definition at line 67 of file alrotation.h.