52 out << m_coords[0] << m_coords[1] << m_coords[2];
72 in >> m_coords[0] >> m_coords[1] >> m_coords[2];
90 b.getInverseHomogeneousMatrix(B_INV);
93 B_INV.get_unsafe(0, 0) * m_coords[0] +
94 B_INV.get_unsafe(0, 1) * m_coords[1] +
95 B_INV.get_unsafe(0, 2) * m_coords[2] + B_INV.get_unsafe(0, 3),
96 B_INV.get_unsafe(1, 0) * m_coords[0] +
97 B_INV.get_unsafe(1, 1) * m_coords[1] +
98 B_INV.get_unsafe(1, 2) * m_coords[2] + B_INV.get_unsafe(1, 3),
99 B_INV.get_unsafe(2, 0) * m_coords[0] +
100 B_INV.get_unsafe(2, 1) * m_coords[1] +
101 B_INV.get_unsafe(2, 2) * m_coords[2] + B_INV.get_unsafe(2, 3));
110 m_coords[0] -
b.m_coords[0], m_coords[1] -
b.m_coords[1],
111 m_coords[2] -
b.m_coords[2]);
120 m_coords[0] +
b.m_coords[0], m_coords[1] +
b.m_coords[1],
121 m_coords[2] +
b.m_coords[2]);
130 m_coords[0] +
b.x(), m_coords[1] +
b.y(), m_coords[2] +
b.z(),
b.yaw(),
131 b.pitch(),
b.roll());
136 for (
int i = 0; i < 3; i++)
137 m_coords[i] = std::numeric_limits<double>::quiet_NaN();
double x() const
Common members of all points & poses classes.
void setToNaN() override
Set all data fields to quiet NaN.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
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.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
A numeric matrix of compile-time fixed size.
This base provides a set of functions for maths stuff.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
A class used to store a 2D point.
A class used to store a 3D point.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
mrpt::math::TPoint3D asTPoint() const
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
CPoint3D operator-(const CPose3D &b) const
Returns this point as seen from "b", i.e.
CPoint3D(const double x=0, const double y=0, const double z=0)
Constructor for initializing point coordinates.
CPoint3D operator+(const CPoint3D &b) const
Returns this point plus point "b", i.e.