9 #ifndef _LIBALMATH_ALMATH_TYPES_ALPOSE2D_H_
10 #define _LIBALMATH_ALMATH_TYPES_ALPOSE2D_H_
14 #include <almath/api.h>
67 explicit Pose2D(
float pInit);
110 Pose2D(
const std::vector<float>& pFloats);
125 static Pose2D fromPolarCoordinates(
const float pRadius,
const float pAngle);
133 return Pose2D(x + pPos2.
x, y + pPos2.
y, theta + pPos2.
theta);
142 return Pose2D(x - pPos2.
x, y - pPos2.
y, theta - pPos2.
theta);
158 return Pose2D(-x, -y, -theta);
186 x + std::cos(theta) * pPos2.
x - std::sin(theta) * pPos2.
y,
187 y + std::sin(theta) * pPos2.
x + std::cos(theta) * pPos2.
y,
188 theta + pPos2.
theta);
209 return Pose2D(x*pVal, y*pVal, theta*pVal);
216 Pose2D operator/ (
float pVal)
const;
222 Pose2D& operator*= (
float pVal);
228 Pose2D& operator/= (
float pVal);
282 const float& pEpsilon=0.0001f)
const;
287 void toVector(std::vector<float>& pReturnVector)
const;
288 std::vector<float> toVector(
void)
const;
294 void writeToVector(std::vector<float>::iterator& pIt)
const;
304 return std::sqrt(x * x + y * y);
325 return std::atan2(y, x);
343 const Pose2D& pPos2);
358 const Pose2D& pPos2);
374 ALMATH_API Pose2D
pinv(
const Pose2D& pPos);
391 const Pose2D& pPos2);
414 #endif // _LIBALMATH_ALMATH_TYPES_ALPOSE2D_H_
ALMATH_API Pose2D pinv(const Pose2D &pPos)
Alternative name for inverse: return the pose2d inverse of the given Pose2D.
ALMATH_API float distance(const Pose2D &pPos1, const Pose2D &pPos2)
Compute the distance between two Pose2D.
BodyMass< T > operator+(const BodyMass< T > &lhs, const BodyMass< T > &rhs)
float norm() const
Compute the norm of the current Pose2D.
bool isNear(const Transform &lhs, const Transform &rhs, double epsilon)
ALMATH_API float distanceSquared(const Pose2D &pPos1, const Pose2D &pPos2)
Compute the squared distance between two Pose2D.
bool operator!=(const Pose &lhs, const Pose &rhs)
Transform inverse(const Transform &tf)
float getAngle(void) const
Returns the angle of the current Pose2D.
ALMATH_API Position2D normalize(const Position2D &pPos)
Normalize a Position2D.
ALMATH_API void pose2dInvertInPlace(Pose2D &pPos)
Inverse the given Pose2D in place:
ALMATH_API Pose2D pose2DInverse(const Pose2D &pPos)
Compute the inverse of a Pose2D.
A pose in a 2-dimentional space.
ALMATH_API 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 BodyMass< T > &lhs, const BodyMass< T > &rhs)