MRPT logo

mrpt::poses::CPoint2D Class Reference

A class used to store a 2D point. More...

#include <mrpt/poses/CPoint2D.h>

Inheritance diagram for mrpt::poses::CPoint2D:

mrpt::poses::CPoint mrpt::poses::CPoseOrPoint mrpt::utils::CSerializable

List of all members.

Public Member Functions

 CPoint2D (double x=0, double y=0)
 Constructor for initializing point coordinates.
 CPoint2D (const CPose2D &o)
 Constructor from x/y coordinates given from other pose.
 CPoint2D (const CPose3D &o)
 Constructor from x/y coordinates given from other pose.
 CPoint2D (const CPoint3D &o)
 Constructor from x/y coordinates given from a 3D point.
 CPoint2D (const mrpt::math::TPoint2D &o)
 Implicit constructor from lightweight type.
CPoint2D operator- (const CPose2D &b) const
 The operator D="this"-b is the pose inverse compounding operator, the resulting points "D" fulfils: "this" = b + D, so that: b == a + (b-a).
void getAsVector (vector_double &v) const
 Return the pose or point as a 1x2 vector: [x y].
void getHomogeneousMatrix (CMatrixDouble44 &out_HM) const
 Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).


Detailed Description

A class used to store a 2D point.

For a complete description of Points/Poses, see mrpt::poses::CPoseOrPoint, or refer to the 2D/3D Geometry tutorial in the wiki.

poses::CPoint2D

Homogeneous transfomation matrix

Spatial representation

1

0

0

x

0

1

0

y

0

0

1

0

0

0

0

1

CPoint2D.gif

See also:
CPoseOrPoint,CPose, CPoint

Definition at line 151 of file CPoint2D.h.


Constructor & Destructor Documentation

mrpt::poses::CPoint2D::CPoint2D ( double  x = 0,
double  y = 0 
)

Constructor for initializing point coordinates.

mrpt::poses::CPoint2D::CPoint2D ( const CPose2D o  )  [explicit]

Constructor from x/y coordinates given from other pose.

mrpt::poses::CPoint2D::CPoint2D ( const CPose3D o  )  [explicit]

Constructor from x/y coordinates given from other pose.

mrpt::poses::CPoint2D::CPoint2D ( const CPoint3D o  )  [explicit]

Constructor from x/y coordinates given from a 3D point.

mrpt::poses::CPoint2D::CPoint2D ( const mrpt::math::TPoint2D o  ) 

Implicit constructor from lightweight type.


Member Function Documentation

void mrpt::poses::CPoint2D::getAsVector ( vector_double v  )  const [virtual]

Return the pose or point as a 1x2 vector: [x y].

Implements mrpt::poses::CPoseOrPoint.

void mrpt::poses::CPoint2D::getHomogeneousMatrix ( CMatrixDouble44 out_HM  )  const [inline, virtual]

Returns the corresponding 4x4 homogeneous transformation matrix for the point(translation) or pose (translation+orientation).

See also:
getInverseHomogeneousMatrix

Implements mrpt::poses::CPoseOrPoint.

Definition at line 188 of file CPoint2D.h.

References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe(), and mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::unit().

CPoint2D mrpt::poses::CPoint2D::operator- ( const CPose2D b  )  const

The operator D="this"-b is the pose inverse compounding operator, the resulting points "D" fulfils: "this" = b + D, so that: b == a + (b-a).




Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 23:10:56 EDT 2009