A class used to store a 2D point. More...
#include <mrpt/poses/CPoint2D.h>


Public Member Functions | |
| CPoint2D (double x=0, double y=0) | |
| Constructor for initializing point coordinates. | |
| CPoint2D (const CPose2D &o) | |
| Constructor from x/y coordinates given from other pose. | |
| CPoint2D (const CPose3D &o) | |
| Constructor from x/y coordinates given from other pose. | |
| CPoint2D (const CPoint3D &o) | |
| Constructor from x/y coordinates given from a 3D point. | |
| CPoint2D (const mrpt::math::TPoint2D &o) | |
| Implicit constructor from lightweight type. | |
| CPoint2D | operator- (const CPose2D &b) const |
| The operator D="this"-b is the pose inverse compounding operator, the resulting points "D" fulfils: "this" = b + D, so that: b == a + (b-a). | |
| void | getAsVector (vector_double &v) const |
| Return the pose or point as a 1x2 vector: [x y]. | |
| void | getHomogeneousMatrix (CMatrixDouble44 &out_HM) const |
| Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation). | |
| void | asString (std::string &s) const |
| Returns a human-readable textual representation of the object (eg: "[0.02 1.04 -0.8]" ). | |
| void | fromString (const std::string &s) |
| Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0.8]" ). | |
| double | operator[] (unsigned int i) const |
A class used to store a 2D point.
For a complete description of Points/Poses, see mrpt::poses::CPoseOrPoint, or refer to the 2D/3D Geometry tutorial in the wiki.
|
Homogeneous transfomation matrix |
Spatial representation | ||||||||||||||||
|
| ||||||||||||||||
Definition at line 151 of file CPoint2D.h.
| mrpt::poses::CPoint2D::CPoint2D | ( | double | x = 0, |
|
| double | y = 0 | |||
| ) |
Constructor for initializing point coordinates.
| mrpt::poses::CPoint2D::CPoint2D | ( | const CPose2D & | o | ) | [explicit] |
Constructor from x/y coordinates given from other pose.
| mrpt::poses::CPoint2D::CPoint2D | ( | const CPose3D & | o | ) | [explicit] |
Constructor from x/y coordinates given from other pose.
| mrpt::poses::CPoint2D::CPoint2D | ( | const CPoint3D & | o | ) | [explicit] |
Constructor from x/y coordinates given from a 3D point.
| mrpt::poses::CPoint2D::CPoint2D | ( | const mrpt::math::TPoint2D & | o | ) |
Implicit constructor from lightweight type.
| void mrpt::poses::CPoint2D::asString | ( | std::string & | s | ) | const [inline, virtual] |
Returns a human-readable textual representation of the object (eg: "[0.02 1.04 -0.8]" ).
Implements mrpt::poses::CPoseOrPoint.
Definition at line 198 of file CPoint2D.h.
References mrpt::format().
| void mrpt::poses::CPoint2D::fromString | ( | const std::string & | s | ) | [inline, virtual] |
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04 -0.8]" ).
| std::exception | On invalid format |
Implements mrpt::poses::CPoseOrPoint.
Definition at line 204 of file CPoint2D.h.
References ASSERTMSG_, mrpt::math::CMatrixTemplate< T >::fromMatlabStringFormat(), mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::math::size(), and THROW_EXCEPTION.
| void mrpt::poses::CPoint2D::getAsVector | ( | vector_double & | v | ) | const [virtual] |
Return the pose or point as a 1x2 vector: [x y].
Implements mrpt::poses::CPoseOrPoint.
| void mrpt::poses::CPoint2D::getHomogeneousMatrix | ( | CMatrixDouble44 & | out_HM | ) | const [inline, virtual] |
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).
Implements mrpt::poses::CPoseOrPoint.
Definition at line 188 of file CPoint2D.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe(), and mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::unit().
The operator D="this"-b is the pose inverse compounding operator, the resulting points "D" fulfils: "this" = b + D, so that: b == a + (b-a).
| double mrpt::poses::CPoint2D::operator[] | ( | unsigned int | i | ) | const [inline] |
Definition at line 212 of file CPoint2D.h.
| Page generated by Doxygen 1.6.2 for MRPT 0.8.1 SVN:exported at Mon Feb 15 22:01:07 UTC 2010 |