A pose in a 2-dimentional space. More...
#include <alpose2d.h>
Public Member Functions | |
Pose2D () | |
Create a Pose2D initialized with 0.0f. | |
Pose2D (float pInit) | |
Create a Pose2D initialize with the same float. | |
Pose2D (float pX, float pY, float pTheta) | |
Create a Pose2D initialized with explicit value. | |
Pose2D (const std::vector< float > &pFloats) | |
Create a Pose2D with an std::vector. | |
Pose2D | operator+ (const Pose2D &pPos2) const |
Overloading of operator + for Pose2D. | |
Pose2D | operator- (const Pose2D &pPos2) const |
Overloading of operator - for Pose2D. | |
Pose2D | operator+ () const |
Overloading of operator + for Pose2D. | |
Pose2D | operator- () const |
Overloading of operator - for Pose2D. | |
Pose2D & | operator+= (const Pose2D &pPos2) |
Overloading of operator += for Pose2D. | |
Pose2D & | operator-= (const Pose2D &pPos2) |
Overloading of operator -= for Pose2D. | |
Pose2D & | operator*= (const Pose2D &pPos2) |
Overloading of operator *= for Pose2D. | |
Pose2D | operator* (const Pose2D &pPos2) const |
Overloading of operator * for Pose2D. | |
bool | operator== (const Pose2D &pPos2) const |
Overloading of operator == for Pose2D. | |
bool | operator!= (const Pose2D &pPos2) const |
Overloading of operator != for Pose2D. | |
Pose2D | operator* (float pVal) const |
Overloading of operator * for Pose2D. | |
Pose2D | operator/ (float pVal) const |
Overloading of operator / for Pose2D. | |
Pose2D & | operator*= (float pVal) |
Overloading of operator *= for Pose2D. | |
Pose2D & | operator/= (float pVal) |
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. | |
float | distance (const Pose2D &pPos2) const |
Compute the distance between the actual Pose2D and the one give in argument. | |
Pose2D | inverse () const |
Return the inverse of the Pose2D. | |
bool | isNear (const Pose2D &pPos2, const float &pEpsilon=0.0001f) const |
Check if the actual Pose2D is near the one given in argument. | |
std::vector< float > | toVector () const |
Return the Pose2D as a vector of float [x, y, theta]. |
Public Attributes | |
float | x |
float | y |
float | theta |
A pose in a 2-dimentional space.
On a plane a position is totally defined by the postions x,y and the rotation theta.
Definition at line 24 of file alpose2d.h.
AL::Math::Pose2D::Pose2D | ( | ) |
Create a Pose2D initialized with 0.0f.
|
explicit |
|
explicit |
Create a Pose2D initialized with explicit value.
pX | the float value for x |
pY | the float value for y |
pTheta | the float value for theta |
AL::Math::Pose2D::Pose2D | ( | const std::vector< float > & | pFloats | ) |
Create a Pose2D with an std::vector.
pFloats | An std::vector<float> of size 3 for respectively: |
x, y and theta
float AL::Math::Pose2D::distance | ( | const Pose2D & | pPos2 | ) | const |
float AL::Math::Pose2D::distanceSquared | ( | const Pose2D & | pPos2 | ) | const |
bool AL::Math::Pose2D::isNear | ( | const Pose2D & | pPos2, |
const float & | pEpsilon = 0.0001f |
||
) | const |
bool AL::Math::Pose2D::operator!= | ( | const Pose2D & | pPos2 | ) | const |
Pose2D AL::Math::Pose2D::operator* | ( | float | pVal | ) | const |
Overloading of operator * for Pose2D.
pVal | the float factor |
Pose2D& AL::Math::Pose2D::operator*= | ( | float | pVal | ) |
Overloading of operator *= for Pose2D.
pVal | the float factor |
Pose2D AL::Math::Pose2D::operator/ | ( | float | pVal | ) | const |
Overloading of operator / for Pose2D.
pVal | the float factor |
Pose2D& AL::Math::Pose2D::operator/= | ( | float | pVal | ) |
Overloading of operator /= for Pose2D.
pVal | the float factor |
bool AL::Math::Pose2D::operator== | ( | const Pose2D & | pPos2 | ) | const |
std::vector<float> AL::Math::Pose2D::toVector | ( | ) | const |
Return the Pose2D as a vector of float [x, y, theta].
float AL::Math::Pose2D::theta |
Definition at line 30 of file alpose2d.h.
float AL::Math::Pose2D::x |
Definition at line 26 of file alpose2d.h.
float AL::Math::Pose2D::y |
Definition at line 28 of file alpose2d.h.