61 out << m_coords[0] << m_coords[1] << m_coords[2];
87 in >> m_coords[0] >> m_coords[1] >> m_coords[2];
105 b.getInverseHomogeneousMatrix(B_INV);
108 B_INV.get_unsafe(0, 0) * m_coords[0] +
109 B_INV.get_unsafe(0, 1) * m_coords[1] +
110 B_INV.get_unsafe(0, 2) * m_coords[2] + B_INV.get_unsafe(0, 3),
111 B_INV.get_unsafe(1, 0) * m_coords[0] +
112 B_INV.get_unsafe(1, 1) * m_coords[1] +
113 B_INV.get_unsafe(1, 2) * m_coords[2] + B_INV.get_unsafe(1, 3),
114 B_INV.get_unsafe(2, 0) * m_coords[0] +
115 B_INV.get_unsafe(2, 1) * m_coords[1] +
116 B_INV.get_unsafe(2, 2) * m_coords[2] + B_INV.get_unsafe(2, 3));
125 m_coords[0] -
b.m_coords[0], m_coords[1] -
b.m_coords[1],
126 m_coords[2] -
b.m_coords[2]);
135 m_coords[0] +
b.m_coords[0], m_coords[1] +
b.m_coords[1],
136 m_coords[2] +
b.m_coords[2]);
145 m_coords[0] +
b.x(), m_coords[1] +
b.y(), m_coords[2] +
b.z(),
b.yaw(),
146 b.pitch(),
b.roll());
151 for (
int i = 0; i < 3; i++)
152 m_coords[i] = std::numeric_limits<double>::quiet_NaN();
double x() const
Common members of all points & poses classes.
Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
void writeToStream(mrpt::utils::CStream &out, int *getVersion) const override
Introduces a pure virtual method responsible for writing to a CStream.
void setToNaN() override
Set all data fields to quiet NaN.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
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...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
A numeric matrix of compile-time fixed size.
This base provides a set of functions for maths stuff.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
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...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
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.