26 float xMin,
float xMax,
float zMin,
float zMax,
float y,
float frequency,
27 float lineWidth,
bool antiAliasing)
33 m_frequency(frequency),
34 m_lineWidth(lineWidth),
35 m_antiAliasing(antiAliasing)
44 #if MRPT_HAS_OPENGL_GLUT 62 for (
float z = m_zMin;
z <= m_zMax;
z += m_frequency)
68 for (
float x = m_xMin;
x <= m_xMax;
x += m_frequency)
89 writeToStreamRender(out);
90 out << m_xMin << m_xMax;
91 out << m_zMin << m_zMax << m_plane_y;
93 out << m_lineWidth << m_antiAliasing;
104 readFromStreamRender(
in);
105 in >> m_xMin >> m_xMax;
106 in >> m_zMin >> m_zMax >> m_plane_y;
109 in >> m_lineWidth >> m_antiAliasing;
113 m_antiAliasing =
true;
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.
#define GL_ONE_MINUS_SRC_ALPHA
GLAPI void GLAPIENTRY glPopAttrib(void)
GLAPI void GLAPIENTRY glLineWidth(GLfloat width)
A grid of lines over the XZ plane.
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 ASSERT_(f)
Defines an assertion mechanism.
#define GL_COLOR_BUFFER_BIT
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
GLAPI void GLAPIENTRY glBegin(GLenum mode)
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
GLAPI void GLAPIENTRY glVertex3f(GLfloat x, GLfloat y, GLfloat z)
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 checkOpenGLError()
Checks glGetError and throws an exception if an error situation is found.
void render_dl() const override
Render.
The namespace for 3D scene representation and rendering.
GLAPI void GLAPIENTRY glEnd(void)
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...
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
GLAPI void GLAPIENTRY glDisable(GLenum cap)