class mrpt::viz::CColorBar
Overview
A colorbar indicator.
This class renders a colorbar as a 3D object, in the XY plane. For an overlay indicator that can be easily added to any display, see Scene::addColorBar()
See also:
mrpt::viz::Scene, mrpt::viz::CRenderizable, Scene::addColorBar()
#include <mrpt/viz/CColorBar.h> class CColorBar: public mrpt::viz::CVisualObject, public mrpt::viz::VisualObjectParams_Triangles { public: // construction 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 ); // methods virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const; void setColormap(const mrpt::img::TColormap colormap); void setColorAndValueLimits( float col_min, float col_max, float value_min, float value_max ); };
Inherited Members
public: // typedefs typedef std::shared_ptr<CObject> Ptr; typedef std::shared_ptr<const CObject> ConstPtr; typedef std::unique_ptr<CObject> UniquePtr; typedef std::unique_ptr<const CObject> ConstUniquePtr; // structs struct OutdatedState; struct State; // methods const auto& shaderTrianglesBuffer() const; auto& shaderTrianglesBufferMutex() const; virtual CVisualObject& setColor_u8(const mrpt::img::TColor& c); bool isLightEnabled() const; void enableLight(bool enable = true); TCullFace cullFaces() const; void notifyBBoxChange() const; auto getBoundingBoxLocalf() const; static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
Methods
virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const
Must be implemented by derived classes to provide the updated bounding box in the object local frame of coordinates.
This will be called only once after each time the derived class reports to notifyChange() that the object geometry changed.
See also:
getBoundingBox(), getBoundingBoxLocal(), getBoundingBoxLocalf()