50 template <
class OTHERCLASS, std::
size_t DIM2>
99 static constexpr
bool empty() {
return false; }
104 throw std::logic_error(
format(
105 "Try to change the size of CPoint2D to %u.",
106 static_cast<unsigned>(
n)));
115 std::ostream&
operator<<(std::ostream& o,
const CPoint2D&
p);
A compile-time fixed-size numeric matrix container.
mrpt::math::CVectorFixedDouble< 2 > m_coords
[x,y]
void asVector(vector_t &v) const
Return the pose or point as a 2x1 vector [x, y]'.
static constexpr bool is_PDF()
static void resize(const size_t n)
static constexpr bool empty()
std::ostream & operator<<(std::ostream &o, const CPoint2D &p)
Dumps a point as a string (x,y)
CPoint2D(const CPoseOrPoint< OTHERCLASS, DIM2 > &b)
Constructor from x/y coordinates given from other pose.
#define DEFINE_SCHEMA_SERIALIZABLE()
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
static constexpr size_type max_size()
A base class for representing a point in 2D or 3D.
CPoint2D(double x=0, double y=0)
Constructor for initializing point coordinates.
double x() const
Common members of all points & poses classes.
The base template class for 2D & 3D points and poses.
A class used to store a 2D point.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
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...
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
std::ptrdiff_t difference_type
double value_type
The type of the elements.
CVectorFixed< double, N > CVectorFixedDouble
Specialization of CVectorFixed for double numbers.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
CPoint2D operator-(const CPose2D &b) const
The operator D="this"-b is the pose inverse compounding operator, the resulting points "D" fulfils: "...
mrpt::math::TPoint2D asTPoint() const
static constexpr bool is_3D()
static constexpr size_type size()
const double & const_reference