51 template <
class OTHERCLASS>
106 static constexpr
bool empty() {
return false; }
111 throw std::logic_error(
format(
112 "Try to change the size of CPoint2D to %u.",
113 static_cast<unsigned>(
n)));
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
CArrayNumeric is an array for numeric types supporting several mathematical operations (actually,...
A class used to store a 2D point.
mrpt::math::TPoint2D asTPoint() const
CPoint2D(double x=0, double y=0)
Constructor for initializing point coordinates.
const double & const_reference
static void resize(const size_t n)
CPoint2D operator-(const CPose2D &b) const
The operator D="this"-b is the pose inverse compounding operator, the resulting points "D" fulfils: "...
std::ptrdiff_t difference_type
static constexpr bool is_3D()
static constexpr size_type size()
CPoint2D(const mrpt::math::TPoint2D &o)
Implicit constructor from lightweight type.
mrpt::math::CArrayDouble< 2 > m_coords
[x,y]
CPoint2D(const mrpt::math::TPoint3D &o)
Explicit constructor from lightweight type (loses the z coord).
CPoint2D(const CPoseOrPoint< OTHERCLASS > &b)
Constructor from x/y coordinates given from other pose.
static constexpr bool is_PDF()
static constexpr size_type max_size()
void setToNaN() override
Set all data fields to quiet NaN.
double value_type
The type of the elements.
static constexpr bool empty()
A base class for representing a point in 2D or 3D.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
The base template class for 2D & 3D points and poses.
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.
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
double x
X,Y,Z coordinates.