53 template <
class OTHERCLASS>
106 static inline bool empty() {
return false; }
111 throw std::logic_error(
113 "Try to change the size of CPoint2D to %u.",
114 static_cast<unsigned>(
n)));
double x() const
Common members of all points & poses classes.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
static void resize(const size_t n)
CPoint2D(const CPoseOrPoint< OTHERCLASS > &b)
Constructor from x/y coordinates given from other pose.
mrpt::math::CArrayDouble< 2 > m_coords
[x,y]
CPoint2D(const mrpt::math::TPoint2D &o)
Implicit constructor from lightweight type.
A base class for representing a point in 2D or 3D.
static size_type max_size()
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
double x
X,Y,Z coordinates.
CPoint2D(double x=0, double y=0)
Constructor for initializing point coordinates.
The base template class for 2D & 3D points and poses.
A class used to store a 2D point.
void setToNaN() override
Set all data fields to quiet NaN.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
std::ptrdiff_t difference_type
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
double value_type
The type of the elements.
CPoint2D operator-(const CPose2D &b) const
The operator D="this"-b is the pose inverse compounding operator, the resulting points "D" fulfils: "...
CPoint2D(const mrpt::math::TPoint3D &o)
Explicit constructor from lightweight type (loses the z coord).
const double & const_reference