MRPT logo
Public Member Functions | Public Attributes

mrpt::math::TPoint2D Struct Reference

Lightweight 2D point. More...

#include <mrpt/math/lightweight_geom_data.h>

List of all members.

Public Member Functions

 TPoint2D (const TPose2D &p)
 Constructor from TPose2D, discarding phi.
 TPoint2D (const TPoint3D &p)
 Constructor from TPoint3D, discarding z.
 TPoint2D (const TPose3D &p)
 Constructor from TPose3D, discarding z and the angular coordinates.
 TPoint2D (const mrpt::poses::CPoseOrPoint &p)
 Constructor from CPoseOrPoint, losing information.
 TPoint2D (const mrpt::poses::CPoint2D &p)
 Implicit constructor from heavyweight type.
 TPoint2D (double xx, double yy)
 Constructor from coordinates.
 TPoint2D ()
 Default fast constructor.
double & operator[] (size_t i)
 Unsafe coordinate access using operator[].
const double & operator[] (size_t i) const
 Unsafe coordinate access using operator[].
void getAsVector (vector_double &v) const
 Transformation into vector.
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

Public Attributes

double x
 X coordinate.
double y
 Y coordinate.

Detailed Description

Lightweight 2D point.

Allows coordinate access using [] operator.

See also:
mrpt::poses::CPoint2D

Definition at line 63 of file lightweight_geom_data.h.


Constructor & Destructor Documentation

mrpt::math::TPoint2D::TPoint2D ( const TPose2D &  p  )  [explicit]

Constructor from TPose2D, discarding phi.

See also:
TPose2D
mrpt::math::TPoint2D::TPoint2D ( const TPoint3D &  p  )  [explicit]

Constructor from TPoint3D, discarding z.

See also:
TPoint3D
mrpt::math::TPoint2D::TPoint2D ( const TPose3D &  p  )  [explicit]

Constructor from TPose3D, discarding z and the angular coordinates.

See also:
TPose3D
mrpt::math::TPoint2D::TPoint2D ( const mrpt::poses::CPoseOrPoint &  p  )  [explicit]

Constructor from CPoseOrPoint, losing information.

See also:
CPoseOrPoint,CPoint3D,CPose2D,CPose3D
mrpt::math::TPoint2D::TPoint2D ( const mrpt::poses::CPoint2D &  p  ) 

Implicit constructor from heavyweight type.

See also:
CPoint2D
mrpt::math::TPoint2D::TPoint2D ( double  xx,
double  yy 
) [inline]

Constructor from coordinates.

Definition at line 100 of file lightweight_geom_data.h.

mrpt::math::TPoint2D::TPoint2D (  )  [inline]

Default fast constructor.

Initializes to garbage.

Definition at line 104 of file lightweight_geom_data.h.


Member Function Documentation

void mrpt::math::TPoint2D::getAsVector ( vector_double &  v  )  const [inline]

Transformation into vector.

Definition at line 120 of file lightweight_geom_data.h.

TPoint2D mrpt::math::TPoint2D::operator* ( double  d  )  const [inline]

Definition at line 161 of file lightweight_geom_data.h.

TPoint2D& mrpt::math::TPoint2D::operator*= ( double  d  )  [inline]

Definition at line 139 of file lightweight_geom_data.h.

TPoint2D mrpt::math::TPoint2D::operator+ ( const TPoint2D &  p  )  const [inline]

Definition at line 151 of file lightweight_geom_data.h.

TPoint2D& mrpt::math::TPoint2D::operator+= ( const TPoint2D &  p  )  [inline]

Definition at line 127 of file lightweight_geom_data.h.

References x, and y.

TPoint2D mrpt::math::TPoint2D::operator- ( const TPoint2D &  p  )  const [inline]

Definition at line 156 of file lightweight_geom_data.h.

TPoint2D& mrpt::math::TPoint2D::operator-= ( const TPoint2D &  p  )  [inline]

Definition at line 133 of file lightweight_geom_data.h.

References x, and y.

TPoint2D mrpt::math::TPoint2D::operator/ ( double  d  )  const [inline]

Definition at line 166 of file lightweight_geom_data.h.

TPoint2D& mrpt::math::TPoint2D::operator/= ( double  d  )  [inline]

Definition at line 145 of file lightweight_geom_data.h.

bool mrpt::math::TPoint2D::operator< ( const TPoint2D &  p  )  const
double& mrpt::math::TPoint2D::operator[] ( size_t  i  )  [inline]

Unsafe coordinate access using operator[].

Intended for loops.

Definition at line 108 of file lightweight_geom_data.h.

const double& mrpt::math::TPoint2D::operator[] ( size_t  i  )  const [inline]

Unsafe coordinate access using operator[].

Intended for loops.

Definition at line 114 of file lightweight_geom_data.h.


Member Data Documentation




Page generated by Doxygen 1.7.1 for MRPT 0.8.1 SVN:exported at Sun Sep 19 14:53:45 UTC 2010