9 #ifndef _LIBALMATH_ALMATH_TYPES_ALROTATION_H_
10 #define _LIBALMATH_ALMATH_TYPES_ALROTATION_H_
125 Rotation (
const std::vector<float>& pFloats);
164 const float& pEpsilon=0.0001f)
const;
184 bool isRotation(
const float& pEpsilon=0.0001f)
const;
335 void toVector(std::vector<float>& pReturnValue)
const;
337 std::vector<float>
toVector(
void)
const;
350 Rotation
transpose(
const Rotation& pRot);
496 #endif // _LIBALMATH_ALMATH_TYPES_ALROTATION_H_
Rotation & operator*=(const Rotation &pRot2)
Overloading of operator *= for Rotation.
void normalizeRotation(void)
Normalize data, if needed, to have Rotation properties.
float r2_c1
row 2 column 1.
Rotation rotationFromRotX(const float pRotX)
Create a Rotation initialized with explicit rotation around x axis.
bool operator!=(const Rotation &pRot2) const
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.
static Rotation fromRotX(const float pRotX)
Create a Rotation initialized with explicit rotation around x axis.
float r3_c1
row 3 column 1.
float r3_c2
row 3 column 2.
static Rotation fromRotXPi()
Rotation()
Create a Rotation initialized to identity.
Rotation rotationFrom3DRotation(const float &pWX, const float &pWY, const float &pWZ)
Create a Rotation initialized with euler angle. Rot = fromRotZ(pWZ)*fromRotY(pWY)*fromRotX(pWX) ...
static Rotation fromRotZHalfPi()
Create a Rotation initialized with rotation of pi/2 around z axis.
Rotation transpose(const Rotation &pRot)
Compute the transpose rotation of the one given in argument:
float r1_c2
row 1 column 2.
std::vector< float > toVector(void) const
Rotation rotationFromRotY(const float pRotY)
Create a Rotation initialized with explicit rotation around y axis.
bool isRotation(const float &pEpsilon=0.0001f) const
Check if the rotation is correct. The condition checks are: and determinant(R) = 1...
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)...
Rotation transpose() const
Compute the rotation transpose (inverse) of the actual Rotation:
float r2_c2
row 2 column 2.
Rotation rotationFromRotZ(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.
static Rotation fromRotZPi()
Create a Rotation initialized with rotation of pi around z axis.
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).
float r2_c3
row 2 column 3.
float r3_c3
row 3 column 3.
static Rotation fromRotZ(const float pRotZ)
Create a Rotation initialized with explicit rotation around z axis.
static Rotation fromRotYPi()
float determinant(const Rotation &pRot)
Compute the determinant of the given Rotation:
float r1_c1
row 1 column 1.
static Rotation fromRotY(const float pRotY)
Create a Rotation initialized with explicit rotation around y axis.
void applyRotation(const AL::Math::Rotation &pRot, float &pX, float &pY, float &pZ)
Apply Rotation to a 3D point.
bool isNear(const Rotation &pRot2, const float &pEpsilon=0.0001f) const
Check if the actual Rotation is near the one give in argument.
float determinant() const
Compute the determinant of the Rotation:
float r1_c3
row 1 column 3.
void normalizeRotation(Rotation &pRot)
Normalize data, if needed, to have Rotation properties.