9 #ifndef _LIBALMATH_ALMATH_TYPES_ALTRANSFORM_H_
10 #define _LIBALMATH_ALMATH_TYPES_ALTRANSFORM_H_
25 float r1_c1, r1_c2, r1_c3, r1_c4;
26 float r2_c1, r2_c2, r2_c3, r2_c4;
27 float r3_c1, r3_c2, r3_c3, r3_c4;
71 explicit Transform(
const std::vector<float>& pFloats);
136 const float& pEpsilon=0.0001f)
const;
151 const float& pEpsilon=0.0001f)
const;
356 void toVector(std::vector<float>& pReturnVector)
const;
358 std::vector<float> toVector(
void)
const;
410 std::vector<float>& pTOut);
457 float determinant(
const std::vector<float>& pFloats);
723 #endif // _LIBALMATH_ALMATH_TYPES_ALTRANSFORM_H_
Transform transformFrom3DRotation(const float &pWX, const float &pWY, const float &pWZ)
Create a Transform initialize with euler angle: H = fromRotZ(pWZ)*fromRotY(pWY)*fromRotX(pWX) ...
void toVector(std::vector< float > &pReturnVector) const
Return the Transform as a vector of float:
Transform inverse() const
Compute the transform inverse of the actual Transform:
float determinant() const
Compute the determinant of rotation part of the actual Transform:
static Transform fromRotY(const float pRotY)
Create a Transform initialized with explicit rotation around y axis.
Transform & operator*=(const Transform &pT2)
Overloading of operator *= for Transform.
Transform transformFromPosition(const float &pX, const float &pY, const float &pZ, const float &pWX, const float &pWY, const float &pWZ)
Create a Transform initialize with explicit value for translation part and euler angle: ...
float determinant(const std::vector< float > &pFloats)
Compute the determinant of rotation part of the given vector of floats:
static Transform fromPosition(const float pX, const float pY, const float pZ)
Create a Transform initialize with explicit value for translation part.
Transform diff(const Transform &pT2) const
Compute the Transform between the actual Transform and the one given in argument: ...
A homogenous transformation matrix.
static Transform fromRotZ(const float pRotZ)
Create a Transform initialized with explicit rotation around z axis.
Transform transformInverse(const Transform &pT)
Return the transform inverse of the given Transform:
bool isTransform(const float &pEpsilon=0.0001f) const
Check if the rotation part is correct. The condition checks are: and determinant(R) = 1...
Transform transformFromRotX(const float pRotX)
Create a Transform initialize with explicit rotation around x axis:
Transform transformFromRotY(const float pRotY)
Create a Transform initialize with explicit rotation around y axis:
static Transform from3DRotation(const float &pWX, const float &pWY, const float &pWZ)
Create a Transform initialize with euler angle.
static Transform fromRotX(const float pRotX)
Create a Transform initialized with explicit rotation around x axis.
void normalizeTransform(void)
Normalize data, if needed, to have transform properties.
void normalizeTransform(Transform &pT)
Normalize data, if needed, to have transform properties.
bool isNear(const Transform &pT2, const float &pEpsilon=0.0001f) const
Check if the actual Transform is near the one given in argument.
void transformPreMultiply(const Transform &pT, Transform &pTOut)
pTOut = pT*pTOut
float distance(const Transform &pT2) const
Compute the distance between the actual Transform and the one given in argument:
Transform pinv(const Transform &pT)
Alternative name for inverse: return the transform inverse of the given Transform: ...
Transform()
Create a Transform initialized to identity.
std::vector< float > transformToFloatVector(const Transform &pT)
DEPRECATED: Use toVector function. Return the Transform in a vector of float:
float transformDistance(const Transform &pT1, const Transform &pT2)
Compute the distance between the actual Transform and the one give in argument:
float norm(const Transform &pT)
Compute the norm translation part of the actual Transform:
float distanceSquared(const Transform &pT2) const
Compute the squared distance between the actual Transform and the one given in argument (translation ...
bool operator!=(const Transform &pT2) const
Overloading of operator != for Transform.
float transformDistanceSquared(const Transform &pT1, const Transform &pT2)
Compute the squared distance between the actual Transform and the one give in argument (translation p...
Transform transformDiff(const Transform &pT1, const Transform &pT2)
Compute the Transform between the actual Transform and the one give in argument result: ...
bool operator==(const Transform &pT2) const
Overloading of operator == for Transform.
Transform transformFromRotZ(const float pRotZ)
Create a Transform initialize with explicit rotation around z axis:
float norm() const
Compute the norm translation part of the actual Transform:
void transformInvertInPlace(Transform &pT)
Inverse the given Transform in place:
Transform operator*(const Transform &pT2) const
Overloading of operator * for Transform.