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;
303 return std::sqrt(
x *
x +
y *
y);
324 return std::atan2(
y,
x);
342 const Pose2D& pPos2);
357 const Pose2D& pPos2);
373 Pose2D
pinv(
const Pose2D& pPos);
390 const Pose2D& pPos2);
413 #endif // _LIBALMATH_ALMATH_TYPES_ALPOSE2D_H_
bool isNear(const Pose2D &pPos2, const float &pEpsilon=0.0001f) const
Check if the actual Pose2D is near the one given in argument.
void pose2dInvertInPlace(Pose2D &pPos)
Inverse the given Pose2D in place:
Pose2D()
Create a Pose2D initialized with 0.0f.
bool operator!=(const Pose2D &pPos2) const
Overloading of operator != for Pose2D.
Pose2D & operator*=(const Pose2D &pPos2)
Overloading of operator *= for Pose2D.
float distanceSquared(const Pose2D &pPos2) const
Compute the squared distance between the actual Pose2D and the one give in argument.
Pose2D operator+(void) const
Overloading of operator + for Pose2D.
float norm() const
Compute the norm of the current Pose2D.
Pose2D operator*(const Pose2D &pPos2) const
Overloading of operator * for Pose2D.
Pose2D & operator-=(const Pose2D &pPos2)
Overloading of operator -= for Pose2D.
bool operator==(const Pose2D &pPos2) const
Overloading of operator == for Pose2D.
float distance(const Pose2D &pPos2) const
Compute the distance between the actual Pose2D and the one give in argument.
Pose2D normalize() const
Normalize the current Pose2D position.
void writeToVector(std::vector< float >::iterator &pIt) const
Write [x, y, theta] in the vector and update the iterator. It is assumed the vector has enough space...
float distanceSquared(const Pose2D &pPos1, const Pose2D &pPos2)
Compute the squared distance between two Pose2D.
Pose2D & operator+=(const Pose2D &pPos2)
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: ...
Pose2D operator/(float pVal) const
Overloading of operator / for Pose2D.
float distance(const Pose2D &pPos1, const Pose2D &pPos2)
Compute the distance between two Pose2D.
float getAngle(void) const
Returns the angle of the current Pose2D.
Pose2D operator-() const
Overloading of operator - for Pose2D.
A pose in a 2-dimentional space.
Pose2D inverse() const
Return the inverse of the Pose2D
Pose2D & operator/=(float pVal)
Overloading of operator /= for Pose2D.
Pose2D diff(const Pose2D &pPos2) const
Compute the Pose2D between the actual Pose2D and the one given in argument:
std::vector< float > toVector(void) const
Pose2D pose2DInverse(const Pose2D &pPos)
Compute the inverse of a Pose2D.
Pose2D pinv(const Pose2D &pPos)
Alternative name for inverse: return the pose2d inverse of the given Pose2D.