MRPT  2.0.4
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
mrpt::math::TPoint2D_< T > Struct Template Reference

Detailed Description

template<typename T>
struct mrpt::math::TPoint2D_< T >

Base template for TPoint2D and TPoint2Df.

Forward declarations of all mrpt::math classes related to poses and points.

Definition at line 32 of file TPoint2D.h.

#include <mrpt/math/TPoint2D.h>

Inheritance diagram for mrpt::math::TPoint2D_< T >:

Public Types

enum  { static_size = 2 }
 

Public Member Functions

constexpr TPoint2D_ ()
 Default constructor. More...
 
constexpr TPoint2D_ (T xx, T yy)
 Constructor from coordinates. More...
 
template<typename U >
 TPoint2D_ (const TPoint2D_data< U > &p)
 Explicit constructor from coordinates. More...
 
template<typename U >
 TPoint2D_ (const mrpt::math::CMatrixFixed< U, 2, 1 > &m)
 Constructor from column vector. More...
 
 TPoint2D_ (const TPose2D &p)
 Constructor from TPose2D, discarding phi. More...
 
 TPoint2D_ (const TPoint3D_< T > &p)
 Constructor from TPoint3D, discarding z. More...
 
 TPoint2D_ (const TPose3D &p)
 Constructor from TPose3D, discarding z and the angular coordinates. More...
 
template<typename U >
TPoint2D_< U > cast () const
 Return a copy of this object using type U for coordinates. More...
 
T & operator[] (size_t i)
 Coordinate access using operator[]. More...
 
constexpr T operator[] (size_t i) const
 Coordinate access using operator[]. More...
 
template<typename U >
void asVector (std::vector< U > &v) const
 Transformation into vector. More...
 
bool operator< (const TPoint2D_ &p) const
 
TPoint2D_operator+= (const TPoint2D_ &p)
 
TPoint2D_operator-= (const TPoint2D_ &p)
 
TPoint2D_operator*= (T d)
 
TPoint2D_operator/= (T d)
 
constexpr TPoint2D_ operator+ (const TPoint2D_ &p) const
 
constexpr TPoint2D_ operator- (const TPoint2D_ &p) const
 
constexpr TPoint2D_ operator* (T d) const
 
constexpr TPoint2D_ operator/ (T 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...
 
sqrNorm () const
 Squared norm: |v|^2 = x^2+y^2. More...
 
norm () const
 Point norm: |v| = sqrt(x^2+y^2) More...
 
constexpr std::size_t rows () const
 
constexpr std::size_t cols () const
 
constexpr std::size_t size () const
 
void resize (std::size_t n)
 throws if attempted to resize to incorrect length More...
 

Static Public Member Functions

static TPoint2D_ FromString (const std::string &s)
 

Public Attributes

x
 X,Y coordinates. More...
 
y
 

Member Enumeration Documentation

◆ anonymous enum

template<typename T>
anonymous enum
Enumerator
static_size 

Definition at line 36 of file TPoint2D.h.

Constructor & Destructor Documentation

◆ TPoint2D_() [1/7]

template<typename T>
constexpr mrpt::math::TPoint2D_< T >::TPoint2D_ ( )
inline

Default constructor.

Initializes to zeros

Definition at line 41 of file TPoint2D.h.

◆ TPoint2D_() [2/7]

template<typename T>
constexpr mrpt::math::TPoint2D_< T >::TPoint2D_ ( xx,
yy 
)
inline

Constructor from coordinates.

Definition at line 43 of file TPoint2D.h.

◆ TPoint2D_() [3/7]

template<typename T>
template<typename U >
mrpt::math::TPoint2D_< T >::TPoint2D_ ( const TPoint2D_data< U > &  p)
inline

Explicit constructor from coordinates.

Definition at line 47 of file TPoint2D.h.

◆ TPoint2D_() [4/7]

template<typename T>
template<typename U >
mrpt::math::TPoint2D_< T >::TPoint2D_ ( const mrpt::math::CMatrixFixed< U, 2, 1 > &  m)
inline

Constructor from column vector.

Definition at line 55 of file TPoint2D.h.

◆ TPoint2D_() [5/7]

template<typename T>
mrpt::math::TPoint2D_< T >::TPoint2D_ ( const TPose2D p)
explicit

Constructor from TPose2D, discarding phi.

See also
TPose2D

Definition at line 25 of file TPoint2D.cpp.

◆ TPoint2D_() [6/7]

template<typename T>
mrpt::math::TPoint2D_< T >::TPoint2D_ ( const TPoint3D_< T > &  p)
explicit

Constructor from TPoint3D, discarding z.

See also
TPoint3D

Definition at line 31 of file TPoint2D.cpp.

◆ TPoint2D_() [7/7]

template<typename T>
mrpt::math::TPoint2D_< T >::TPoint2D_ ( const TPose3D p)
explicit

Constructor from TPose3D, discarding z and the angular coordinates.

See also
TPose3D

Definition at line 36 of file TPoint2D.cpp.

Member Function Documentation

◆ asString() [1/2]

template<typename T>
void mrpt::math::TPoint2D_< T >::asString ( std::string &  s) const
inline

Returns a human-readable textual representation of the object (eg: "[0.02 1.04]" )

See also
fromString

Definition at line 175 of file TPoint2D.h.

◆ asString() [2/2]

template<typename T>
std::string mrpt::math::TPoint2D_< T >::asString ( ) const
inline

Definition at line 180 of file TPoint2D.h.

Referenced by mrpt::math::TPoint2D_< double >::asString().

Here is the caller graph for this function:

◆ asVector()

template<typename T>
template<typename U >
void mrpt::math::TPoint2D_< T >::asVector ( std::vector< U > &  v) const
inline

Transformation into vector.

Definition at line 114 of file TPoint2D.h.

◆ cast()

template<typename T>
template<typename U >
TPoint2D_<U> mrpt::math::TPoint2D_< T >::cast ( ) const
inline

Return a copy of this object using type U for coordinates.

Definition at line 78 of file TPoint2D.h.

◆ cols()

constexpr std::size_t mrpt::math::internal::ProvideStaticResize< TPoint2D_< T > >::cols ( ) const
inlineinherited

Definition at line 66 of file TPoseOrPoint.h.

◆ fromString()

template<typename T >
void mrpt::math::TPoint2D_< T >::fromString ( const std::string &  s)

Set the current object value from a string generated by 'asString' (eg: "[0.02 1.04]" )

See also
asString
Exceptions
std::exceptionOn invalid format

Definition at line 53 of file TPoint2D.cpp.

Referenced by mrpt::math::TPoint2D_< double >::FromString().

Here is the caller graph for this function:

◆ FromString()

template<typename T>
static TPoint2D_ mrpt::math::TPoint2D_< T >::FromString ( const std::string &  s)
inlinestatic

Definition at line 194 of file TPoint2D.h.

◆ norm()

template<typename T>
T mrpt::math::TPoint2D_< T >::norm ( ) const
inline

Point norm: |v| = sqrt(x^2+y^2)

Definition at line 205 of file TPoint2D.h.

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().

Here is the caller graph for this function:

◆ operator*()

template<typename T>
constexpr TPoint2D_ mrpt::math::TPoint2D_< T >::operator* ( d) const
inline

Definition at line 162 of file TPoint2D.h.

◆ operator*=()

template<typename T>
TPoint2D_& mrpt::math::TPoint2D_< T >::operator*= ( d)
inline

Definition at line 137 of file TPoint2D.h.

◆ operator+()

template<typename T>
constexpr TPoint2D_ mrpt::math::TPoint2D_< T >::operator+ ( const TPoint2D_< T > &  p) const
inline

Definition at line 152 of file TPoint2D.h.

◆ operator+=()

template<typename T>
TPoint2D_& mrpt::math::TPoint2D_< T >::operator+= ( const TPoint2D_< T > &  p)
inline

Definition at line 123 of file TPoint2D.h.

◆ operator-()

template<typename T>
constexpr TPoint2D_ mrpt::math::TPoint2D_< T >::operator- ( const TPoint2D_< T > &  p) const
inline

Definition at line 157 of file TPoint2D.h.

◆ operator-=()

template<typename T>
TPoint2D_& mrpt::math::TPoint2D_< T >::operator-= ( const TPoint2D_< T > &  p)
inline

Definition at line 130 of file TPoint2D.h.

◆ operator/()

template<typename T>
constexpr TPoint2D_ mrpt::math::TPoint2D_< T >::operator/ ( d) const
inline

Definition at line 166 of file TPoint2D.h.

◆ operator/=()

template<typename T>
TPoint2D_& mrpt::math::TPoint2D_< T >::operator/= ( d)
inline

Definition at line 144 of file TPoint2D.h.

◆ operator<()

template<typename T >
bool mrpt::math::TPoint2D_< T >::operator< ( const TPoint2D_< T > &  p) const

Definition at line 42 of file TPoint2D.cpp.

◆ operator[]() [1/2]

template<typename T>
T& mrpt::math::TPoint2D_< T >::operator[] ( size_t  i)
inline

Coordinate access using operator[].

Order: x,y

Definition at line 84 of file TPoint2D.h.

◆ operator[]() [2/2]

template<typename T>
constexpr T mrpt::math::TPoint2D_< T >::operator[] ( size_t  i) const
inline

Coordinate access using operator[].

Order: x,y

Definition at line 97 of file TPoint2D.h.

◆ resize()

void mrpt::math::internal::ProvideStaticResize< TPoint2D_< T > >::resize ( std::size_t  n)
inlineinherited

throws if attempted to resize to incorrect length

Definition at line 70 of file TPoseOrPoint.h.

◆ rows()

constexpr std::size_t mrpt::math::internal::ProvideStaticResize< TPoint2D_< T > >::rows ( ) const
inlineinherited

Definition at line 65 of file TPoseOrPoint.h.

◆ size()

constexpr std::size_t mrpt::math::internal::ProvideStaticResize< TPoint2D_< T > >::size ( ) const
inlineinherited

Definition at line 67 of file TPoseOrPoint.h.

◆ sqrNorm()

template<typename T>
T mrpt::math::TPoint2D_< T >::sqrNorm ( ) const
inline

Squared norm: |v|^2 = x^2+y^2.

Definition at line 202 of file TPoint2D.h.

Referenced by mrpt::math::TPoint2D_< double >::norm().

Here is the caller graph for this function:

Member Data Documentation

◆ x

template<typename T>
T mrpt::math::TPoint2D_data< T >::x
inherited

X,Y coordinates.

Definition at line 25 of file TPoint2D.h.

Referenced by mrpt::slam::CGridMapAligner::AlignPDF_robustMatch(), mrpt::math::areAligned(), mrpt::math::TPoint2D_< double >::asString(), mrpt::math::TPoint2D_< double >::asVector(), mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CHolonomicND::calcRepresentativeSectorForGap(), mrpt::math::TPoint2D_< double >::cast(), mrpt::nav::CReactiveNavigationSystem::checkCollisionWithLatestObstacles(), mrpt::nav::CReactiveNavigationSystem3D::checkCollisionWithLatestObstacles(), mrpt::maps::CPointsMap::clipOutOfRange(), mrpt::nav::collision_free_dist_arc_circ_robot(), mrpt::nav::collision_free_dist_segment_circ_robot(), mrpt::math::TPose2D::composePoint(), mrpt::poses::CPose2D::composePoint(), mrpt::poses::CPosePDFGaussian::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::opengl::internal::Font::fill(), mrpt::vision::findMultipleChessboardsCorners(), mrpt::math::getAngleBisector(), mrpt::nav::TWaypoint::getAsText(), mrpt::math::TPolygon2D::getBoundingBox(), mrpt::math::TPolygon2D::getCenter(), mrpt::math::TSegment2D::getCenter(), mrpt::maps::CPointsMap::getPoint(), mrpt::math::getRectangleBounds(), mrpt::math::getSegmentBisector(), mrpt::opengl::internal::glDrawText(), 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::math::intersect(), mrpt::math::TPose2D::inverseComposePoint(), mrpt::poses::CPose2D::inverseComposePoint(), mrpt::poses::CPose3D::inverseComposePoint(), 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::slam::CRangeBearingKFSLAM2D::OnTransitionJacobian(), mrpt::math::operator!=(), mrpt::math::TPoint2D_< double >::operator*(), mrpt::math::TPoint2D_< double >::operator*=(), mrpt::math::TPoint2D_< double >::operator+(), mrpt::poses::operator+(), mrpt::math::TPoint2D_< double >::operator+=(), mrpt::math::TPoint2D_< double >::operator-(), mrpt::math::TPoint2D_< double >::operator-=(), mrpt::math::TPoint2D_< double >::operator/(), mrpt::math::TPoint2D_< double >::operator/=(), mrpt::math::TPoint2D_< double >::operator<(), mrpt::math::operator==(), mrpt::math::TPoint2D_< double >::operator[](), mrpt::opengl::internal::Font::outline(), mrpt::apps::CGridMapAlignerApp::run(), mrpt::nav::CHolonomicND::searchBestGap(), mrpt::maps::CPointsMap::setPoint(), mrpt::math::TPoint2D_< double >::sqrNorm(), mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondenceT(), TEST(), mrpt::math::TLine2D::TLine2D(), mrpt::math::TPoint2D_< double >::TPoint2D_(), mrpt::math::TPoint3D_< float >::TPoint3D_(), mrpt::topography::transformHelmert2D(), mrpt::topography::transformHelmert2D_TOPCON(), unsafeProjectPoint(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().

◆ y

template<typename T>
T mrpt::math::TPoint2D_data< T >::y
inherited

Definition at line 25 of file TPoint2D.h.

Referenced by mrpt::slam::CGridMapAligner::AlignPDF_robustMatch(), mrpt::math::areAligned(), mrpt::math::TPoint2D_< double >::asString(), mrpt::math::TPoint2D_< double >::asVector(), mrpt::nav::CAbstractPTGBasedReactive::build_movement_candidate(), mrpt::nav::CAbstractPTGBasedReactive::calc_move_candidate_scores(), mrpt::nav::CHolonomicND::calcRepresentativeSectorForGap(), mrpt::math::TPoint2D_< double >::cast(), mrpt::nav::CReactiveNavigationSystem::checkCollisionWithLatestObstacles(), mrpt::nav::CReactiveNavigationSystem3D::checkCollisionWithLatestObstacles(), mrpt::maps::CPointsMap::clipOutOfRange(), mrpt::nav::collision_free_dist_arc_circ_robot(), mrpt::nav::collision_free_dist_segment_circ_robot(), mrpt::math::TPose2D::composePoint(), mrpt::poses::CPose2D::composePoint(), mrpt::poses::CPosePDFGaussian::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::opengl::internal::Font::fill(), mrpt::math::getAngleBisector(), mrpt::nav::TWaypoint::getAsText(), mrpt::math::TPolygon2D::getBoundingBox(), mrpt::math::TPolygon2D::getCenter(), mrpt::math::TSegment2D::getCenter(), mrpt::maps::CPointsMap::getPoint(), mrpt::math::getRectangleBounds(), mrpt::math::getSegmentBisector(), mrpt::opengl::internal::glDrawText(), 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::math::intersect(), mrpt::math::TPose2D::inverseComposePoint(), mrpt::poses::CPose2D::inverseComposePoint(), mrpt::poses::CPose3D::inverseComposePoint(), 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::slam::CRangeBearingKFSLAM2D::OnTransitionJacobian(), mrpt::math::operator!=(), mrpt::math::TPoint2D_< double >::operator*(), mrpt::math::TPoint2D_< double >::operator*=(), mrpt::math::TPoint2D_< double >::operator+(), mrpt::poses::operator+(), mrpt::math::TPoint2D_< double >::operator+=(), mrpt::math::TPoint2D_< double >::operator-(), mrpt::math::TPoint2D_< double >::operator-=(), mrpt::math::TPoint2D_< double >::operator/(), mrpt::math::TPoint2D_< double >::operator/=(), mrpt::math::TPoint2D_< double >::operator<(), mrpt::math::operator==(), mrpt::math::TPoint2D_< double >::operator[](), mrpt::opengl::internal::Font::outline(), mrpt::apps::CGridMapAlignerApp::run(), mrpt::nav::CHolonomicND::searchBestGap(), mrpt::maps::CPointsMap::setPoint(), mrpt::math::TPoint2D_< double >::sqrNorm(), mrpt::maps::CPointsMap::squareDistanceToClosestCorrespondenceT(), TEST(), mrpt::math::TLine2D::TLine2D(), mrpt::math::TPoint2D_< double >::TPoint2D_(), mrpt::math::TPoint3D_< float >::TPoint3D_(), mrpt::topography::transformHelmert2D(), mrpt::topography::transformHelmert2D_TOPCON(), unsafeProjectPoint(), and mrpt::nav::CWaypointsNavigator::waypoints_navigationStep().




Page generated by Doxygen 1.8.14 for MRPT 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020