34 out << m_coords[0] << m_coords[1];
59 in >> m_coords[0] >> m_coords[1];
73 const double ccos = cos(
b.phi());
74 const double ssin = sin(
b.phi());
75 const double Ax =
x() -
b.x();
76 const double Ay =
y() -
b.y();
78 return CPoint2D(Ax * ccos + Ay * ssin, -Ax * ssin + Ay * ccos);
83 for (
int i = 0; i < 2; i++)
84 m_coords[i] = std::numeric_limits<double>::quiet_NaN();
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
A class used to store a 2D point.
CPoint2D operator-(const CPose2D &b) const
The operator D="this"-b is the pose inverse compounding operator, the resulting points "D" fulfils: "...
void readFromStream(mrpt::utils::CStream &in, int version) override
Introduces a pure virtual method responsible for loading from a CStream This can not be used directly...
void setToNaN() override
Set all data fields to quiet NaN.
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.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
This base provides a set of functions for maths stuff.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values,...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.