25 float x0,
float y0,
float z0,
float x1,
float y1,
float z1,
float lineWidth,
33 m_lineWidth(lineWidth),
34 m_antiAliasing(antiAliasing)
43 #if MRPT_HAS_OPENGL_GLUT 57 glColor4ub(m_color.R, m_color.G, m_color.B, m_color.A);
77 writeToStreamRender(out);
78 out << m_x0 << m_y0 << m_z0;
79 out << m_x1 << m_y1 << m_z1 << m_lineWidth;
80 out << m_antiAliasing;
90 readFromStreamRender(
in);
91 in >> m_x0 >> m_y0 >> m_z0;
92 in >> m_x1 >> m_y1 >> m_z1 >> m_lineWidth;
96 m_antiAliasing =
true;
112 bb_max.x = std::max(m_x0, m_x1);
113 bb_max.y = std::max(m_y0, m_y1);
114 bb_max.z = std::max(m_z0, m_z1);
void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
GLAPI void GLAPIENTRY glEnable(GLenum cap)
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
To be added to all CSerializable-classes implementation files.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
#define GL_ONE_MINUS_SRC_ALPHA
GLAPI void GLAPIENTRY glPopAttrib(void)
GLAPI void GLAPIENTRY glLineWidth(GLfloat width)
GLAPI void GLAPIENTRY glBlendFunc(GLenum sfactor, GLenum dfactor)
A renderizable object suitable for rendering with OpenGL's display lists.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
#define GL_COLOR_BUFFER_BIT
This base provides a set of functions for maths stuff.
void render_dl() const override
Render.
GLAPI void GLAPIENTRY glBegin(GLenum mode)
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...
GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z)
GLAPI void GLAPIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for "archives": classes abstracting I/O streams.
GLAPI void GLAPIENTRY glPushAttrib(GLbitfield mask)
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
void checkOpenGLError()
Checks glGetError and throws an exception if an error situation is found.
The namespace for 3D scene representation and rendering.
GLAPI void GLAPIENTRY glEnd(void)
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
GLAPI void GLAPIENTRY glDisable(GLenum cap)