15#ifndef COLORMAP_H_6014714286
16#define COLORMAP_H_6014714286
50 const std::unique_ptr< Details > pimpl;
57 const static unsigned int DEFAULT_RESOLUTION = ( 1 << 16 );
70 explicit ColorMap(
unsigned int resolution = DEFAULT_RESOLUTION );
Contains forward-declarations.
Represents an association.
Represents a mapping of intensity values to RGBA colors, that can be queried in a shader.
ColorMap & writeLinearSegment(float intensityFirst, float intensityLast, const base::Color &colorFirst, const base::Color &colorLast)
void bind(int unit) const
Binds this texture and the corresponding sampler to unit.
void setMinimumIntensity(float minimumIntensity)
Sets the minimum intensity value. Intensity values below this value are treated as 0.
~ColorMap()
Deletes the maintained OpenGL texture and sampler objects.
ColorMap(unsigned int resolution=DEFAULT_RESOLUTION)
Instantiates.
const std::vector< base::Color > & getColorList() const
Returns the list of colors stored in the color map.
void setMaximumIntensity(float maximumIntensity)
Sets the maximum intensity value. Intensity values above this value are treated as 1.
ColorMap & writeLinearSpline(const std::vector< base::Color > &colors)
Writes a linear segment with writeLinearSegment for each subsequent pair of colors....
float minimumIntensity() const
Returns the minimum intensity value. Intensity values below this value are treated as 0.
void clear()
Clears the color map. All intensity values are mapped to base::Color::BLACK_NO_ALPHA after calling th...
ColorMap & operator=(const ColorMap &other)
Writes the content the other color map into this.
ColorMap & writeLinearSegment(const base::math::Span< float > &intensityRange, const base::math::Span< base::Color > colorRange)
Linearly maps all intensity values from intensityRange to colorRange.
float maximumIntensity() const
Returns the maximum intensity value. Intensity values above this value are treated as 1.
static const float DEFAULT_MINIMUM_INTENSITY
Holds the default value for minimumIntensity.
static const float DEFAULT_MAXIMUM_INTENSITY
Holds the default value for maximumIntensity.
Represents a color. Objects from this class are copyable and assignable.
Defines an interval with T.
Defines LibCarna::base::noncopyable and NON_COPYABLE.
#define NON_COPYABLE
Marks the class that it is placed in as non-copyable.