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