Lightweight 2D point.
Allows coordinate access using [] operator.
Definition at line 33 of file lightweight_geom_data.h.
#include <mrpt/math/lightweight_geom_data.h>
Public Types | |
| enum | { static_size = 2 } |
Public Member Functions | |
| TPoint2D (const TPose2D &p) | |
| Constructor from TPose2D, discarding phi. More... | |
| TPoint2D (const TPoint3D &p) | |
| Constructor from TPoint3D, discarding z. More... | |
| TPoint2D (const TPose3D &p) | |
| Constructor from TPose3D, discarding z and the angular coordinates. More... | |
| template<class DERIVEDCLASS > | |
| TPoint2D (const mrpt::poses::CPoseOrPoint< DERIVEDCLASS > &p) | |
| Constructor from CPoseOrPoint, perhaps losing 3D information. More... | |
| TPoint2D (const mrpt::utils::TPixelCoordf &p) | |
| Implicit transformation constructor from TPixelCoordf. More... | |
| TPoint2D (const mrpt::poses::CPoint2D &p) | |
| Implicit constructor from mrpt::poses::CPoint2D More... | |
| TPoint2D (double xx, double yy) | |
| Constructor from coordinates. More... | |
| TPoint2D () | |
| Default fast constructor. More... | |
| double & | operator[] (size_t i) |
| Coordinate access using operator[]. More... | |
| const double & | operator[] (size_t i) const |
| Coordinate access using operator[]. More... | |
| void | getAsVector (std::vector< double > &v) const |
| Transformation into vector. More... | |
| bool | operator< (const TPoint2D &p) const |
| TPoint2D & | operator+= (const TPoint2D &p) |
| TPoint2D & | operator-= (const TPoint2D &p) |
| TPoint2D & | operator*= (double d) |
| TPoint2D & | operator/= (double d) |
| TPoint2D | operator+ (const TPoint2D &p) const |
| TPoint2D | operator- (const TPoint2D &p) const |
| TPoint2D | operator* (double d) const |
| TPoint2D | operator/ (double d) const |
| void | asString (std::string &s) const |
| Returns a human-readable textual representation of the object (eg: "[0.02 1.04]" ) More... | |
| 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]" ) More... | |
| double | norm () const |
| Point norm. More... | |
Static Public Member Functions | |
| static size_t | size () |
Public Attributes | |
| double | x |
| double | y |
| X,Y coordinates. More... | |
| anonymous enum |
| Enumerator | |
|---|---|
| static_size | |
Definition at line 34 of file lightweight_geom_data.h.
|
explicit |
|
explicit |
|
explicit |
|
inlineexplicit |
Constructor from CPoseOrPoint, perhaps losing 3D information.
Definition at line 55 of file lightweight_geom_data.h.
|
inline |
Implicit transformation constructor from TPixelCoordf.
Definition at line 58 of file lightweight_geom_data.h.
| mrpt::math::TPoint2D::TPoint2D | ( | const mrpt::poses::CPoint2D & | p | ) |
Implicit constructor from mrpt::poses::CPoint2D
|
inline |
Constructor from coordinates.
Definition at line 65 of file lightweight_geom_data.h.
|
inline |
Default fast constructor.
Initializes to garbage.
Definition at line 69 of file lightweight_geom_data.h.
|
inline |
Definition at line 131 of file lightweight_geom_data.h.
References asString().
Referenced by asString().
|
inline |
Returns a human-readable textual representation of the object (eg: "[0.02 1.04]" )
Definition at line 130 of file lightweight_geom_data.h.
References mrpt::format().
| void mrpt::math::TPoint2D::fromString | ( | const std::string & | s | ) |
Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04]" )
| std::exception | On invalid format |
|
inline |
Transformation into vector.
Definition at line 77 of file lightweight_geom_data.h.
|
inline |
Point norm.
Definition at line 141 of file lightweight_geom_data.h.
References mrpt::utils::square().
|
inline |
Definition at line 118 of file lightweight_geom_data.h.
|
inline |
Definition at line 96 of file lightweight_geom_data.h.
Definition at line 108 of file lightweight_geom_data.h.
Definition at line 84 of file lightweight_geom_data.h.
Definition at line 113 of file lightweight_geom_data.h.
Definition at line 90 of file lightweight_geom_data.h.
|
inline |
Definition at line 123 of file lightweight_geom_data.h.
|
inline |
Definition at line 102 of file lightweight_geom_data.h.
| bool mrpt::math::TPoint2D::operator< | ( | const TPoint2D & | p | ) | const |
|
inline |
Coordinate access using operator[].
Order: x,y
Definition at line 71 of file lightweight_geom_data.h.
|
inline |
Coordinate access using operator[].
Order: x,y
Definition at line 73 of file lightweight_geom_data.h.
|
inlinestatic |
Definition at line 138 of file lightweight_geom_data.h.
| double mrpt::math::TPoint2D::x |
Definition at line 35 of file lightweight_geom_data.h.
Referenced by mrpt::poses::CPose3D::composePoint(), mrpt::poses::CPoint2D::CPoint2D(), mrpt::math::TSegment2D::getCenter(), mrpt::maps::CPointsMap::getPoint(), mrpt::poses::CPose3D::inverseComposePoint(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeClosestPoint2D(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeClosestPoint2DsqrError(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeNClosestPoint2D(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeNClosestPoint2DIdx(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeTwoClosestPoint2D(), mrpt::math::operator!=(), operator+=(), operator-=(), mrpt::math::operator==(), mrpt::maps::CPointsMap::setPoint(), and mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondenceT().
| double mrpt::math::TPoint2D::y |
X,Y coordinates.
Definition at line 35 of file lightweight_geom_data.h.
Referenced by mrpt::poses::CPose3D::composePoint(), mrpt::poses::CPoint2D::CPoint2D(), mrpt::math::TSegment2D::getCenter(), mrpt::maps::CPointsMap::getPoint(), mrpt::poses::CPose3D::inverseComposePoint(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeClosestPoint2D(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeClosestPoint2DsqrError(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeNClosestPoint2D(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeNClosestPoint2DIdx(), mrpt::math::KDTreeCapable< Derived, num_t, metric_t >::kdTreeTwoClosestPoint2D(), mrpt::math::operator!=(), operator+=(), operator-=(), mrpt::math::operator==(), mrpt::maps::CPointsMap::setPoint(), and mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondenceT().
| Page generated by Doxygen 1.9.1 for MRPT 1.4.0 SVN: at Fri Sep 3 01:11:30 UTC 2021 |