26 class CPlanarLaserScan;
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 onUpdateBuffers_Triangles() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void onUpdateBuffers_Wireframe() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
mrpt::maps::CSimplePointsMap m_cache_points
void setSurfaceColor(float R, float G, float B, float A=1.0f)
void freeOpenGLResources() override
Free opengl buffers.
void notifyChange() const
Call to enable calling renderUpdateBuffers() before the next render() rendering iteration.
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans. ...
Renderizable generic renderer for objects using the triangles shader.
void freeOpenGLResources() override
Free opengl buffers.
mrpt::math::TPoint3Df getLocalRepresentativePoint() const override
Provide a representative point (in object local coordinates), used to sort objects by eye-distance wh...
std::vector< shader_id_t > shader_list_t
A list of shader IDs.
void enableLine(bool enable=true)
Show or hides lines along all scanned points.
Context for calls to render()
~CPlanarLaserScan() override=default
void enableSurface(bool enable=true)
Show or hides the scanned area as a 2D surface.
static constexpr shader_id_t WIREFRAME
void freeOpenGLResources() override
Free opengl buffers.
This object renders a 2D laser scan by means of three elements: the points, the line along end-points...
Renderizable generic renderer for objects using the points shader.
static constexpr shader_id_t TRIANGLES
void enablePoints(bool enable=true)
Show or hides the scanned points.
mrpt::obs::CObservation2DRangeScan m_scan
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
Renderizable generic renderer for objects using the wireframe shader.
void setLineColor(float R, float G, float B, float A=1.0f)
CPlanarLaserScan()=default
The namespace for 3D scene representation and rendering.
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
void setPointsColor(float R, float G, float B, float A=1.0f)
void freeOpenGLResources() override
Free opengl buffers.
void onUpdateBuffers_Points() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void clear()
Clear the scan.
void setScan(const mrpt::obs::CObservation2DRangeScan &scan)
static constexpr shader_id_t POINTS
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers, etc.
virtual shader_list_t requiredShaders() const override
Returns the ID of the OpenGL shader program required to render this class.