24 float x0,
float y0,
float z0,
float x1,
float y1,
float z1,
float lineWidth,
26 : m_x0(x0), m_y0(y0), m_z0(z0), m_x1(x1), m_y1(y1), m_z1(z1)
28 m_lineWidth = lineWidth;
29 m_antiAliasing = antiAliasing;
37 vbd[0] = {m_x0, m_y0, m_z0};
38 vbd[1] = {m_x1, m_y1, m_z1};
41 m_color_buffer_data.assign(vbd.size(), m_color);
47 writeToStreamRender(
out);
48 out << m_x0 << m_y0 << m_z0;
49 out << m_x1 << m_y1 << m_z1 << m_lineWidth;
50 out << m_antiAliasing;
60 readFromStreamRender(in);
61 in >> m_x0 >> m_y0 >> m_z0;
62 in >> m_x1 >> m_y1 >> m_z1 >> m_lineWidth;
66 m_antiAliasing =
true;
78 bb_min.x = std::min(m_x0, m_x1);
79 bb_min.y = std::min(m_y0, m_y1);
80 bb_min.z = std::min(m_z0, m_z1);
82 bb_max.x = std::max(m_x0, m_x1);
83 bb_max.y = std::max(m_y0, m_y1);
84 bb_max.z = std::max(m_z0, m_z1);
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
void onUpdateBuffers_Wireframe() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
std::vector< mrpt::math::TPoint3Df > m_vertex_buffer_data
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
This base provides a set of functions for maths stuff.
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for "archives": classes abstracting I/O streams.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
mrpt::vision::TStereoCalibResults out
Renderizable generic renderer for objects using the wireframe shader.
The namespace for 3D scene representation and rendering.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.