Go to the documentation of this file.
46 inline CPoint2D(
double x=0,
double y=0) { m_coords[0]=x; m_coords[1]=y; }
49 template <
class OTHERCLASS>
67 enum { is_3D_val = 0 };
68 static inline bool is_3D() {
return is_3D_val!=0; }
69 enum { is_PDF_val = 0 };
70 static inline bool is_PDF() {
return is_PDF_val!=0; }
83 static inline bool empty() {
return false; }
85 static inline void resize(
const size_t n) {
if (n!=
static_size)
throw std::logic_error(
format(
"Try to change the size of CPoint2D to %u.",
static_cast<unsigned>(n))); }
CPose2D BASE_IMPEXP operator-(const CPose2D &p)
Unary - operator: return the inverse pose "-p" (Note that is NOT the same than a pose with negative x...
A base class for representing a point in 2D or 3D.
mrpt::math::CArrayDouble< 2 > m_coords
[x,y]
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static size_type max_size()
The base template class for 2D & 3D points and poses.
CPoint2D(const mrpt::math::TPoint2D &o)
Implicit constructor from lightweight type.
std::ptrdiff_t difference_type
#define DEFINE_SERIALIZABLE_POST(class_name)
A class used to store a 2D pose.
double x() const
Common members of all points & poses classes.
CPoint2D(const CPoseOrPoint< OTHERCLASS > &b)
Constructor from x/y coordinates given from other pose.
#define DEFINE_SERIALIZABLE_PRE(class_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
const typedef double & const_reference
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
CPoint2D(const mrpt::math::TPoint3D &o)
Explicit constructor from lightweight type (loses the z coord).
static void resize(const size_t n)
CPoint2D(double x=0, double y=0)
Constructor for initializing point coordinates.
A class used to store a 2D point.
std::string BASE_IMPEXP format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
double value_type
The type of the elements.
Page generated by Doxygen 1.8.17 for MRPT 1.4.0 SVN: at Tue Mar 3 09:15:16 UTC 2020 | | |