Go to the documentation of this file.
50 template <
class OTHERCLASS, std::
size_t DIM2>
99 static constexpr
bool empty() {
return false; }
101 static inline void resize(
const size_t n)
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);
void asVector(vector_t &v) const
Return the pose or point as a 2x1 vector [x, y]'.
A base class for representing a point in 2D or 3D.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Base template for TPoint2D and TPoint2Df.
double x() const
Common members of all points & poses classes.
mrpt::math::CVectorFixedDouble< 2 > m_coords
[x,y]
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
std::ostream & operator<<(std::ostream &o, const CPoint2D &p)
Dumps a point as a string (x,y)
CVectorFixed< double, N > CVectorFixedDouble
Specialization of CVectorFixed for double numbers.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
static constexpr bool is_PDF()
The base template class for 2D & 3D points and poses.
static constexpr size_type max_size()
static constexpr bool is_3D()
A compile-time fixed-size numeric matrix container.
CPoint2D operator-(const CPose2D &b) const
The operator D="this"-b is the pose inverse compounding operator, the resulting points "D" fulfils: "...
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle.
The virtual base class which provides a unified interface for all persistent objects in MRPT.
mrpt::math::TPoint2D asTPoint() const
void setToNaN() override
Set all data fields to quiet NaN.
#define DEFINE_SCHEMA_SERIALIZABLE()
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
static void resize(const size_t n)
CPoint2D(double x=0, double y=0)
Constructor for initializing point coordinates.
CPoint2D(const CPoseOrPoint< OTHERCLASS, DIM2 > &b)
Constructor from x/y coordinates given from other pose.
A class used to store a 2D point.
static constexpr bool empty()
static constexpr size_type size()
std::string std::string format(std::string_view fmt, ARGS &&... args)
std::ptrdiff_t difference_type
double value_type
The type of the elements.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Fri Jul 17 08:43:33 UTC 2020 | |