Class CPoint2D

Inheritance Relationships

Base Types

  • public mrpt::poses::CPoint< CPoint2D, 2 > (Template Class CPoint)

  • public mrpt::serialization::CSerializable

Class Documentation

class CPoint2D : public mrpt::poses::CPoint<CPoint2D, 2>, public mrpt::serialization::CSerializable

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.

../../output_staging/generated/doxygen/xml/CPoint2D.gif

STL-like methods and typedefs

using value_type = double

The type of the elements

using reference = double&
using const_reference = double
using size_type = std::size_t
using difference_type = std::ptrdiff_t
static constexpr std::size_t static_size = 2
static inline constexpr size_type size()
static inline constexpr bool empty()
static inline constexpr size_type max_size()
static inline void resize(size_t n)

Public Types

enum [anonymous]

Values:

enumerator is_3D_val
enum [anonymous]

Values:

enumerator is_PDF_val

Public Functions

inline CPoint2D()
inline CPoint2D(double x, double y)

Constructor for initializing point coordinates.

template<class OTHERCLASS, std::size_t DIM2>
inline explicit CPoint2D(const CPoseOrPoint<OTHERCLASS, DIM2> &b)

Constructor from x/y coordinates given from other pose.

explicit CPoint2D(const mrpt::math::TPoint2D &o)

Explicit constructor from lightweight type.

explicit CPoint2D(const mrpt::math::TPoint3D &o)

Explicit constructor from lightweight type (loses the z coord).

mrpt::math::TPoint2D asTPoint() const
inline void asVector(vector_t &v) const

Return the pose or point as a 2x1 vector [x, y]’

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)

Public Members

mrpt::math::CVectorFixedDouble<2> m_coords

[x,y]

Public Static Functions

static inline constexpr bool is_3D()
static inline constexpr bool is_PDF()