9 #ifndef _LIBALMATH_ALMATH_TYPES_ALPOSE2D_H_
10 #define _LIBALMATH_ALMATH_TYPES_ALPOSE2D_H_
66 explicit Pose2D(
float pInit);
109 Pose2D(
const std::vector<float>& pFloats);
281 const float& pEpsilon=0.0001f)
const;
286 void toVector(std::vector<float>& pReturnVector)
const;
287 std::vector<float> toVector(
void)
const;
297 return std::sqrt(
x *
x +
y *
y);
318 return std::atan2(
y,
x);
336 const Pose2D& pPos2);
351 const Pose2D& pPos2);
367 Pose2D
pinv(
const Pose2D& pPos);
384 const Pose2D& pPos2);
407 #endif // _LIBALMATH_ALMATH_TYPES_ALPOSE2D_H_
float getAngle(void) const
Returns the angle of the current Pose2D.
Pose2D operator*(const Pose2D &pPos2) const
Overloading of operator * for Pose2D.
Pose2D()
Create a Pose2D initialized with 0.0f.
float distance(const Pose2D &pPos2) const
Compute the distance between the actual Pose2D and the one give in argument.
A pose in a 2-dimentional space.
float norm() const
Compute the norm of the current Pose2D.
Pose2D operator+(void) const
Overloading of operator + for Pose2D.
float distance(const Pose2D &pPos1, const Pose2D &pPos2)
Compute the distance between two Pose2D.
float distanceSquared(const Pose2D &pPos2) const
Compute the squared distance between the actual Pose2D and the one give in argument.
void pose2DInverse(const Pose2D &pPos, Pose2D &pRes)
Compute the inverse of a Pose2D.
Pose2D & operator*=(const Pose2D &pPos2)
Overloading of operator *= for Pose2D.
Pose2D & operator-=(const Pose2D &pPos2)
Overloading of operator -= for Pose2D.
Pose2D pinv(const Pose2D &pPos)
Alternative name for inverse: return the pose2d inverse of the given Pose2D.
Pose2D inverse() const
Return the inverse of the Pose2D
Pose2D operator-() const
Overloading of operator - for Pose2D.
Pose2D & operator+=(const Pose2D &pPos2)
Overloading of operator += for Pose2D.
Pose2D diff(const Pose2D &pPos2) const
Compute the Pose2D between the actual Pose2D and the one given in argument:
bool isNear(const Pose2D &pPos2, const float &pEpsilon=0.0001f) const
Check if the actual Pose2D is near the one given in argument.
bool operator==(const Pose2D &pPos2) const
Overloading of operator == for Pose2D.
Pose2D & operator/=(float pVal)
Overloading of operator /= for Pose2D.
void pose2dInvertInPlace(Pose2D &pPos)
Inverse the given Pose2D in place:
float distanceSquared(const Pose2D &pPos1, const Pose2D &pPos2)
Compute the squared distance between two Pose2D.
static Pose2D fromPolarCoordinates(const float pRadius, const float pAngle)
Create a Pose2D from polar coordinates.
Pose2D operator/(float pVal) const
Overloading of operator / for Pose2D.
Pose2D pose2dDiff(const Pose2D &pPos1, const Pose2D &pPos2)
Compute the Pose2D between the actual Pose2D and the one give in argument result: ...
bool operator!=(const Pose2D &pPos2) const
Overloading of operator != for Pose2D.
Pose2D normalize() const
Normalize the current Pose2D position.