44 double width = 0.2,
double height = 1.0,
46 float min_col = .0,
float max_col = 1.0,
48 float min_value = .0,
float max_value = 1.0,
50 const std::string& label_format = std::string(
"%7.02f"),
52 float label_font_size = .05f);
80 float col_min,
float col_max,
float value_min,
float value_max);
void colormap(const TColormap &color_map, const float color_index, float &r, float &g, float &b)
Transform a float number in the range [0,1] into RGB components.
TColormap
Different colormaps for use in mrpt::img::colormap()
void freeOpenGLResources() override
Free opengl buffers.
void onUpdateBuffers_Wireframe() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
Renderizable generic renderer for objects using the triangles shader.
std::vector< shader_id_t > shader_list_t
A list of shader IDs.
std::string m_label_format
Context for calls to render()
virtual shader_list_t requiredShaders() const override
Returns the ID of the OpenGL shader program required to render this class.
static constexpr shader_id_t WIREFRAME
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers, etc.
void setColorAndValueLimits(float col_min, float col_max, float value_min, float value_max)
void onUpdateBuffers_Triangles() override
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void onUpdateBuffers_all()
static constexpr shader_id_t TRIANGLES
CColorBar(const mrpt::img::TColormap colormap=mrpt::img::cmGRAYSCALE, double width=0.2, double height=1.0, float min_col=.0, float max_col=1.0, float min_value=.0, float max_value=1.0, const std::string &label_format=std::string("%7.02f"), float label_font_size=.05f)
void setColormap(const mrpt::img::TColormap colormap)
Renderizable generic renderer for objects using the wireframe shader.
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...
mrpt::img::TColormap m_colormap
void freeOpenGLResources() override
Free opengl buffers.
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 freeOpenGLResources() override
Free opengl buffers.