25 out << m_coords[0] << m_coords[1];
44 in >> m_coords[0] >> m_coords[1];
58 const double ccos = cos(
b.phi());
59 const double ssin = sin(
b.phi());
60 const double Ax =
x() -
b.x();
61 const double Ay =
y() -
b.y();
63 return CPoint2D(Ax * ccos + Ay * ssin, -Ax * ssin + Ay * ccos);
68 for (
int i = 0; i < 2; i++)
69 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.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
This base provides a set of functions for maths stuff.
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.
Virtual base class for "archives": classes abstracting I/O streams.
A class used to store a 2D pose, including the 2D coordinate point and a heading (phi) angle...
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
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.