A 3*3 rotation matrix.
More...
#include <alrotation.h>
|
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). More...
|
|
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). More...
|
|
static Rotation | fromRotX (const float pRotX) |
| Create a Rotation initialized with explicit rotation around x axis. More...
|
|
static Rotation | fromRotXPi () |
|
static Rotation | fromRotY (const float pRotY) |
| Create a Rotation initialized with explicit rotation around y axis. More...
|
|
static Rotation | fromRotYPi () |
|
static Rotation | fromRotZ (const float pRotZ) |
| Create a Rotation initialized with explicit rotation around z axis. More...
|
|
static Rotation | fromRotZPi () |
| Create a Rotation initialized with rotation of pi around z axis. More...
|
|
static Rotation | fromRotZHalfPi () |
| Create a Rotation initialized with rotation of pi/2 around z axis. More...
|
|
static Rotation | from3DRotation (const float &pWX, const float &pWY, const float &pWZ) |
| Create a Rotation initialized with euler angle. More...
|
|
A 3*3 rotation matrix.
more information
Definition at line 31 of file alrotation.h.
AL::Math::Rotation::Rotation |
( |
| ) |
|
Create a Rotation initialized to identity.
AL::Math::Rotation::Rotation |
( |
const std::vector< float > & |
pFloats | ) |
|
Create a Rotation with an std::vector.
- Parameters
-
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 |
Compute the determinant of the Rotation:
- Returns
- the float determinant of the Rotation
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)
- Parameters
-
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).
- Parameters
-
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).
- Parameters
-
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.
- Parameters
-
pRotX | the float value for angle rotation in radian around x axis |
static Rotation AL::Math::Rotation::fromRotXPi |
( |
| ) |
|
|
inlinestatic |
static Rotation AL::Math::Rotation::fromRotY |
( |
const float |
pRotY | ) |
|
|
static |
Create a Rotation initialized with explicit rotation around y axis.
- Parameters
-
pRotY | the float value for angle rotation in radian around y axis |
static Rotation AL::Math::Rotation::fromRotYPi |
( |
| ) |
|
|
inlinestatic |
static Rotation AL::Math::Rotation::fromRotZ |
( |
const float |
pRotZ | ) |
|
|
static |
Create a Rotation initialized with explicit rotation around z axis.
- Parameters
-
pRotZ | the float value for angle rotation in radian around z axis |
static Rotation AL::Math::Rotation::fromRotZHalfPi |
( |
| ) |
|
|
inlinestatic |
static Rotation AL::Math::Rotation::fromRotZPi |
( |
| ) |
|
|
inlinestatic |
bool AL::Math::Rotation::isNear |
( |
const Rotation & |
pRot2, |
|
|
const float & |
pEpsilon = 0.0001f |
|
) |
| const |
Check if the actual Rotation is near the one give in argument.
- Parameters
-
pRot2 | the second Rotation |
pEpsilon | an optionnal epsilon distance: default: 0.0001 |
- Returns
- true if the distance between the two rotations is less than pEpsilon
bool AL::Math::Rotation::isRotation |
( |
const float & |
pEpsilon = 0.0001f | ) |
const |
Check if the rotation is correct. The condition checks are: and determinant(R) = 1.0
- Parameters
-
pEpsilon | an optionnal epsilon distance. Default: 0.0001 |
- Returns
- true if the Rotation is correct
void AL::Math::Rotation::normalizeRotation |
( |
void |
| ) |
|
Normalize data, if needed, to have Rotation properties.
bool AL::Math::Rotation::operator!= |
( |
const Rotation & |
pRot2 | ) |
const |
Overloading of operator != for Rotation.
- Parameters
-
Overloading of operator * for Rotation.
- Parameters
-
Overloading of operator *= for Rotation.
- Parameters
-
bool AL::Math::Rotation::operator== |
( |
const Rotation & |
pRot2 | ) |
const |
Overloading of operator == for Rotation.
- Parameters
-
void AL::Math::Rotation::toVector |
( |
std::vector< float > & |
pReturnValue | ) |
const |
Return the Rotation as a vector of float:
std::vector<float> AL::Math::Rotation::toVector |
( |
void |
| ) |
const |
Rotation AL::Math::Rotation::transpose |
( |
| ) |
const |
Compute the rotation transpose (inverse) of the actual Rotation:
- Returns
- the Rotation transpose
float AL::Math::Rotation::r1_c1 |
float AL::Math::Rotation::r1_c2 |
float AL::Math::Rotation::r1_c3 |
float AL::Math::Rotation::r2_c1 |
float AL::Math::Rotation::r2_c2 |
float AL::Math::Rotation::r2_c3 |
float AL::Math::Rotation::r3_c1 |
float AL::Math::Rotation::r3_c2 |
float AL::Math::Rotation::r3_c3 |
The documentation for this struct was generated from the following file:
- /home/opennao/work/release-2.8/lib/libalmath/almath/types/alrotation.h