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 |
Constructor from TPose2D, discarding phi.
Definition at line 42 of file lightweight_geom_data.cpp.
|
explicit |
Constructor from TPoint3D, discarding z.
Definition at line 43 of file lightweight_geom_data.cpp.
|
explicit |
Constructor from TPose3D, discarding z and the angular coordinates.
Definition at line 44 of file lightweight_geom_data.cpp.
|
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.
Definition at line 45 of file lightweight_geom_data.cpp.
|
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 |
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::mrpt::format().
|
inline |
Definition at line 131 of file lightweight_geom_data.h.
References asString().
Referenced by asString().
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 |
Definition at line 51 of file lightweight_geom_data.cpp.
References ASSERTMSG_, mrpt::mrpt::math::size(), and THROW_EXCEPTION.
|
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::math::square().
Referenced by mrpt::nav::collision_free_dist_segment_circ_robot(), mrpt::nav::CParameterizedTrajectoryGenerator::evalClearanceSingleObstacle(), mrpt::nav::CHolonomicND::gapsEstimator(), mrpt::nav::CHolonomicND::searchBestGap(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
|
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.
References x.
Definition at line 113 of file lightweight_geom_data.h.
Definition at line 90 of file lightweight_geom_data.h.
References x.
|
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 |
Definition at line 46 of file lightweight_geom_data.cpp.
|
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.
Referenced by mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_ConsensusOWA(), and mrpt::math::TPolygon2D::TPolygon2D().
double mrpt::math::TPoint2D::x |
Definition at line 35 of file lightweight_geom_data.h.
Referenced by mrpt::slam::CGridMapAligner::AlignPDF_robustMatch(), mrpt::math::areAligned(), mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CHolonomicND::calcRepresentativeSectorForGap(), mrpt::nav::CReactiveNavigationSystem::checkCollisionWithLatestObstacles(), mrpt::nav::CReactiveNavigationSystem3D::checkCollisionWithLatestObstacles(), mrpt::vision::checkerBoardStereoCalibration(), mrpt::nav::collision_free_dist_arc_circ_robot(), mrpt::nav::collision_free_dist_segment_circ_robot(), mrpt::poses::CPose2D::composePoint(), mrpt::poses::CPosePDFGaussian::composePoint(), mrpt::math::TPose2D::composePoint(), mrpt::poses::CPose3D::composePoint(), mrpt::maps::COccupancyGridMap2D::computeLikelihoodField_II(), mrpt::maps::COccupancyGridMap2D::computeLikelihoodField_Thrun(), mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_Consensus(), mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_ConsensusOWA(), mrpt::nav::PlannerSimple2D::computePath(), mrpt::poses::CPoint2D::CPoint2D(), mrpt::math::distance(), mrpt::nav::CParameterizedTrajectoryGenerator::evalClearanceSingleObstacle(), mrpt::nav::CHolonomicFullEval::evalSingleTarget(), mrpt::math::TLine2D::evaluatePoint(), mrpt::maps::CPointsMap::extractCylinder(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), mrpt::nav::TWaypoint::getAsText(), mrpt::math::TPolygon2D::getBoundingBox(), mrpt::math::TSegment2D::getCenter(), mrpt::math::getRectangleBounds(), mrpt::math::getSegmentBisector(), mrpt::nav::CAbstractPTGBasedReactive::impl_waypoint_is_reachable(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_GMRF(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KernelDM_DMV(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF2(), mrpt::nav::CPTG_DiffDrive_CollisionGridBased::internal_initialize(), mrpt::poses::CPose2D::inverseComposePoint(), mrpt::math::TPose2D::inverseComposePoint(), mrpt::poses::CPose3D::inverseComposePoint(), mrpt::math::isLeft(), mrpt::nav::TWaypoint::isValid(), mrpt::math::KDTreeCapable< CFeatureList >::kdTreeClosestPoint2D(), mrpt::math::KDTreeCapable< CFeatureList >::kdTreeClosestPoint2DsqrError(), mrpt::math::KDTreeCapable< CFeatureList >::kdTreeNClosestPoint2D(), mrpt::math::KDTreeCapable< CFeatureList >::kdTreeNClosestPoint2DIdx(), mrpt::math::KDTreeCapable< CFeatureList >::kdTreeTwoClosestPoint2D(), mrpt::nav::CReactiveNavigationSystem3D::loggingGetWSObstaclesAndShape(), mrpt::nav::CHolonomicVFF::navigate(), mrpt::slam::CRangeBearingKFSLAM2D::OnTransitionJacobian(), mrpt::math::operator!=(), mrpt::poses::operator+(), operator+=(), operator-=(), mrpt::math::operator<<(), mrpt::math::operator==(), mrpt::math::operator>>(), run_rnav_test(), mrpt::nav::CHolonomicND::searchBestGap(), mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondenceT(), mrpt::math::TLine2D::TLine2D(), mrpt::topography::transformHelmert2D(), mrpt::topography::transformHelmert2D_TOPCON(), unsafeProjectPoint(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
double mrpt::math::TPoint2D::y |
X,Y coordinates.
Definition at line 35 of file lightweight_geom_data.h.
Referenced by mrpt::slam::CGridMapAligner::AlignPDF_robustMatch(), mrpt::math::areAligned(), mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CHolonomicND::calcRepresentativeSectorForGap(), mrpt::nav::CReactiveNavigationSystem::checkCollisionWithLatestObstacles(), mrpt::nav::CReactiveNavigationSystem3D::checkCollisionWithLatestObstacles(), mrpt::vision::checkerBoardStereoCalibration(), mrpt::nav::collision_free_dist_arc_circ_robot(), mrpt::nav::collision_free_dist_segment_circ_robot(), mrpt::poses::CPose2D::composePoint(), mrpt::poses::CPosePDFGaussian::composePoint(), mrpt::math::TPose2D::composePoint(), mrpt::poses::CPose3D::composePoint(), mrpt::maps::COccupancyGridMap2D::computeLikelihoodField_II(), mrpt::maps::COccupancyGridMap2D::computeLikelihoodField_Thrun(), mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_Consensus(), mrpt::maps::COccupancyGridMap2D::computeObservationLikelihood_ConsensusOWA(), mrpt::nav::PlannerSimple2D::computePath(), mrpt::math::TPolygon2D::contains(), mrpt::poses::CPoint2D::CPoint2D(), mrpt::math::distance(), mrpt::nav::CParameterizedTrajectoryGenerator::evalClearanceSingleObstacle(), mrpt::nav::CHolonomicFullEval::evalSingleTarget(), mrpt::math::TLine2D::evaluatePoint(), mrpt::maps::CPointsMap::extractCylinder(), mrpt::poses::CRobot2DPoseEstimator::extrapolateRobotPose(), mrpt::nav::TWaypoint::getAsText(), mrpt::math::TPolygon2D::getBoundingBox(), mrpt::math::TSegment2D::getCenter(), mrpt::math::getRectangleBounds(), mrpt::math::getSegmentBisector(), mrpt::nav::CAbstractPTGBasedReactive::impl_waypoint_is_reachable(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_GMRF(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KernelDM_DMV(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF(), mrpt::maps::CRandomFieldGridMap2D::insertObservation_KF2(), mrpt::nav::CPTG_DiffDrive_CollisionGridBased::internal_initialize(), mrpt::poses::CPose2D::inverseComposePoint(), mrpt::math::TPose2D::inverseComposePoint(), mrpt::poses::CPose3D::inverseComposePoint(), mrpt::math::isLeft(), mrpt::nav::TWaypoint::isValid(), mrpt::math::KDTreeCapable< CFeatureList >::kdTreeClosestPoint2D(), mrpt::math::KDTreeCapable< CFeatureList >::kdTreeClosestPoint2DsqrError(), mrpt::math::KDTreeCapable< CFeatureList >::kdTreeNClosestPoint2D(), mrpt::math::KDTreeCapable< CFeatureList >::kdTreeNClosestPoint2DIdx(), mrpt::math::KDTreeCapable< CFeatureList >::kdTreeTwoClosestPoint2D(), mrpt::nav::CReactiveNavigationSystem3D::loggingGetWSObstaclesAndShape(), mrpt::nav::CHolonomicVFF::navigate(), mrpt::slam::CRangeBearingKFSLAM2D::OnTransitionJacobian(), mrpt::math::operator!=(), mrpt::poses::operator+(), mrpt::math::operator<<(), mrpt::math::operator==(), mrpt::math::operator>>(), run_rnav_test(), mrpt::nav::CHolonomicND::searchBestGap(), mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondenceT(), mrpt::math::TLine2D::TLine2D(), mrpt::topography::transformHelmert2D(), mrpt::topography::transformHelmert2D_TOPCON(), unsafeProjectPoint(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().
Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020 |