A base class for representing a point in 2D or 3D.
For more information refer to the 2D/3D Geometry tutorial online.
#include <mrpt/poses/CPoint.h>

Public Member Functions | |
Methods common to all 2D or 3D points | |
| template<class OTHERCLASS > | |
| void | AddComponents (const OTHERCLASS &b) |
| Scalar addition of all coordinates. | |
| void | operator*= (const double s) |
| Scalar multiplication. | |
| void | getAsVector (vector_double &v) const |
| Return the pose or point as a 1x2 or 1x3 vector [x y] or [x y z]. | |
| vector_double | getAsVector () const |
| 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]" ) | |
| std::string | asString () const |
| void | fromString (const std::string &s) |
| Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04]" ) | |
| const double & | operator[] (unsigned int i) const |
| double & | operator[] (unsigned int i) |
| double | x () const |
| Common members of all points & poses classes. | |
| double & | x () |
| void | x (const double v) |
| double | y () const |
| double & | y () |
| void | y (const double v) |
| void | x_incr (const double v) |
| void | y_incr (const double v) |
| double | sqrDistanceTo (const CPoseOrPoint< OTHERCLASS > &b) const |
| Returns the squared euclidean distance to another pose/point: | |
| double | distanceTo (const CPoseOrPoint< OTHERCLASS > &b) const |
| Returns the Euclidean distance to another pose/point: | |
| double | distanceTo (const mrpt::math::TPoint3D &b) const |
| Returns the euclidean distance to a 3D point: | |
| double | distance2DToSquare (double ax, double ay) const |
| Returns the squared 2D distance from this pose/point to a 2D point (ignores Z, if it exists). | |
| double | distance3DToSquare (double ax, double ay, double az) const |
| Returns the squared 3D distance from this pose/point to a 3D point. | |
| double | distance2DTo (double ax, double ay) const |
| Returns the 2D distance from this pose/point to a 2D point (ignores Z, if it exists). | |
| double | distance3DTo (double ax, double ay, double az) const |
| Returns the 3D distance from this pose/point to a 3D point. | |
| double | norm () const |
Returns the euclidean norm of vector: . | |
| vector_double | getAsVectorVal () const |
| Return the pose or point as a 1xN vector with all the components (see derived classes for each implementation) | |
| CMatrixDouble44 | getHomogeneousMatrixVal () const |
| Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation). | |
| void | getInverseHomogeneousMatrix (math::CMatrixDouble44 &out_HM) const |
| Returns the corresponding 4x4 inverse homogeneous transformation matrix for this point or pose. | |
| mrpt::math::CMatrixDouble44 | getInverseHomogeneousMatrix () const |
| static bool | is3DPoseOrPoint () |
| Return true for poses or points with a Z component, false otherwise. | |
| void mrpt::poses::CPoint::AddComponents | ( | const OTHERCLASS & | b | ) | [inline] |
| void mrpt::poses::CPoint::asString | ( | std::string & | s | ) | const [inline] |
Returns a human-readable textual representation of the object (eg: "[0.02 1.04]" )
| std::string mrpt::poses::CPoint::asString | ( | ) | const [inline] |
Definition at line 99 of file CPoint.h.
Referenced by mrpt::poses::CPoint< CPoint3D >::asString().
| double mrpt::poses::CPoseOrPoint::distance2DTo | ( | double | ax, |
| double | ay | ||
| ) | const [inline, inherited] |
Returns the 2D distance from this pose/point to a 2D point (ignores Z, if it exists).
Definition at line 184 of file CPoseOrPoint.h.
References mrpt::poses::CPoseOrPoint::distance2DToSquare().
| double mrpt::poses::CPoseOrPoint::distance2DToSquare | ( | double | ax, |
| double | ay | ||
| ) | const [inline, inherited] |
Returns the squared 2D distance from this pose/point to a 2D point (ignores Z, if it exists).
Definition at line 176 of file CPoseOrPoint.h.
References mrpt::utils::square(), mrpt::poses::CPoseOrPoint::x(), and mrpt::poses::CPoseOrPoint::y().
| double mrpt::poses::CPoseOrPoint::distance3DTo | ( | double | ax, |
| double | ay, | ||
| double | az | ||
| ) | const [inline, inherited] |
Returns the 3D distance from this pose/point to a 3D point.
Definition at line 187 of file CPoseOrPoint.h.
References mrpt::poses::CPoseOrPoint::distance3DToSquare().
| double mrpt::poses::CPoseOrPoint::distance3DToSquare | ( | double | ax, |
| double | ay, | ||
| double | az | ||
| ) | const [inline, inherited] |
Returns the squared 3D distance from this pose/point to a 3D point.
Definition at line 179 of file CPoseOrPoint.h.
References mrpt::utils::square(), mrpt::poses::CPoseOrPoint::x(), mrpt::poses::CPoseOrPoint::y(), and mrpt::poses::CPoseOrPoint::is3DPoseOrPoint().
| double mrpt::poses::CPoseOrPoint::distanceTo | ( | const CPoseOrPoint< OTHERCLASS > & | b | ) | const [inline, inherited] |
Returns the Euclidean distance to another pose/point:
Definition at line 170 of file CPoseOrPoint.h.
References mrpt::poses::CPoseOrPoint::sqrDistanceTo().
| double mrpt::poses::CPoseOrPoint::distanceTo | ( | const mrpt::math::TPoint3D & | b | ) | const [inline, inherited] |
Returns the euclidean distance to a 3D point:
Definition at line 190 of file CPoseOrPoint.h.
References mrpt::poses::CPoseOrPoint::distance3DTo(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
| void mrpt::poses::CPoint::fromString | ( | const std::string & | s | ) | [inline] |
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04]" )
| std::exception | On invalid format |
| void mrpt::poses::CPoint::getAsVector | ( | vector_double & | v | ) | const [inline] |
| vector_double mrpt::poses::CPoint::getAsVector | ( | ) | const [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 76 of file CPoint.h.
Referenced by mrpt::poses::CPoint< CPoint3D >::getAsVector().
| vector_double mrpt::poses::CPoseOrPoint::getAsVectorVal | ( | ) | const [inline, inherited] |
Return the pose or point as a 1xN vector with all the components (see derived classes for each implementation)
Definition at line 199 of file CPoseOrPoint.h.
| void mrpt::poses::CPoint::getHomogeneousMatrix | ( | CMatrixDouble44 & | out_HM | ) | const [inline] |
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).
| CMatrixDouble44 mrpt::poses::CPoseOrPoint::getHomogeneousMatrixVal | ( | ) | const [inline, inherited] |
Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).
Definition at line 209 of file CPoseOrPoint.h.
References mrpt::math::UNINITIALIZED_MATRIX.
| void mrpt::poses::CPoseOrPoint::getInverseHomogeneousMatrix | ( | math::CMatrixDouble44 & | out_HM | ) | const [inline, inherited] |
Returns the corresponding 4x4 inverse homogeneous transformation matrix for this point or pose.
Definition at line 219 of file CPoseOrPoint.h.
References mrpt::math::homogeneousMatrixInverse().
| mrpt::math::CMatrixDouble44 mrpt::poses::CPoseOrPoint::getInverseHomogeneousMatrix | ( | ) | const [inline, inherited] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 226 of file CPoseOrPoint.h.
References mrpt::math::UNINITIALIZED_MATRIX, and mrpt::poses::CPoseOrPoint::getInverseHomogeneousMatrix().
| static bool mrpt::poses::CPoseOrPoint::is3DPoseOrPoint | ( | ) | [inline, static, inherited] |
Return true for poses or points with a Z component, false otherwise.
Definition at line 149 of file CPoseOrPoint.h.
Referenced by mrpt::poses::CPoint< CPoint3D >::asString().
| double mrpt::poses::CPoseOrPoint::norm | ( | ) | const [inline, inherited] |
Returns the euclidean norm of vector:
.
Definition at line 193 of file CPoseOrPoint.h.
References mrpt::utils::square(), mrpt::poses::CPoseOrPoint::x(), mrpt::poses::CPoseOrPoint::y(), and mrpt::poses::CPoseOrPoint::is3DPoseOrPoint().
| void mrpt::poses::CPoint::operator*= | ( | const double | s | ) | [inline] |
| const double& mrpt::poses::CPoint::operator[] | ( | unsigned int | i | ) | const [inline] |
| double& mrpt::poses::CPoint::operator[] | ( | unsigned int | i | ) | [inline] |
| double mrpt::poses::CPoseOrPoint::sqrDistanceTo | ( | const CPoseOrPoint< OTHERCLASS > & | b | ) | const [inline, inherited] |
Returns the squared euclidean distance to another pose/point:
Definition at line 152 of file CPoseOrPoint.h.
References mrpt::poses::CPoseOrPoint::is3DPoseOrPoint(), mrpt::utils::square(), mrpt::poses::CPoseOrPoint::x(), and mrpt::poses::CPoseOrPoint::y().
| double mrpt::poses::CPoseOrPoint::x | ( | ) | const [inline, inherited] |
Common members of all points & poses classes.
< Get X coord.
Definition at line 135 of file CPoseOrPoint.h.
Referenced by mrpt::poses::CPoint< CPoint3D >::getHomogeneousMatrix().
| double& mrpt::poses::CPoseOrPoint::x | ( | ) | [inline, inherited] |
Definition at line 138 of file CPoseOrPoint.h.
| void mrpt::poses::CPoseOrPoint::x | ( | const double | v | ) | [inline, inherited] |
| v | Set X coord. |
Definition at line 141 of file CPoseOrPoint.h.
| void mrpt::poses::CPoseOrPoint::x_incr | ( | const double | v | ) | [inline, inherited] |
| v | X+=v |
Definition at line 144 of file CPoseOrPoint.h.
| double mrpt::poses::CPoseOrPoint::y | ( | ) | const [inline, inherited] |
< Get Y coord.
Definition at line 136 of file CPoseOrPoint.h.
Referenced by mrpt::poses::CPoint< CPoint3D >::getHomogeneousMatrix(), and mrpt::poses::CPoint< CPoint3D >::asString().
| double& mrpt::poses::CPoseOrPoint::y | ( | ) | [inline, inherited] |
Definition at line 139 of file CPoseOrPoint.h.
| void mrpt::poses::CPoseOrPoint::y | ( | const double | v | ) | [inline, inherited] |
| v | Set Y coord. |
Definition at line 142 of file CPoseOrPoint.h.
| void mrpt::poses::CPoseOrPoint::y_incr | ( | const double | v | ) | [inline, inherited] |
| v | Y+=v |
Definition at line 145 of file CPoseOrPoint.h.
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |