Maps scalar values to texture coordinates/colors using a continuous/gradient style color map with multiple segments of independent gradients. More...
Public Member Functions | |
ScalarMapperContinuousPiecewise () | |
Constructs an empty object. More... | |
double | rangeMinimum () const |
Returns the minimum range value. More... | |
double | rangeMaximum () const |
Returns the maximum range value. More... | |
void | setup (const std::vector< Color3f > &colorsFromToArray, const std::vector< double > &tickValuesArray) |
Sets the scalar mapper from the given tick values array and colors from/to. More... | |
virtual Vec2f | mapToTextureCoordinate (double scalarValue) const |
Maps scalar value to texture coordinate. More... | |
virtual Color3f | mapToColor (double scalarValue) const |
Maps scalar value to color. More... | |
virtual bool | updateTexture (Image *image) const |
Updates texture image. More... | |
virtual double | normalizedValue (double domainValue) const |
Maps domain value (range_min -> range_max) into a normalized value (0 -> 1) More... | |
virtual double | domainValue (double normalizedPosition) const |
Maps normalized value (0 -> 1) into a domain value (range_min -> range_max) More... | |
virtual unsigned int | version () const |
Returns the version of the scalar mapper. Version is increased whenever the mapper is changed. More... | |
![]() | |
virtual std::vector< double > | tickValuesHint () const |
Returns a suggestion for which tick marks to use. The base class returns an empty array. More... | |
Color4f | undefinedColor () const |
Returns the current undefined color. More... | |
void | setUndefinedColor (const Color4f &color) |
Sets the color to use for undefined values (cee::UNDEFINED_DOUBLE) More... | |
bool | aboveRangeColor (Color4f *color) const |
Returns true if an above range color is specified, and the color is set in the color parameter. More... | |
void | setAboveRangeColor (const Color4f &color) |
Sets the color to use for values that are above the range of the mapper. More... | |
void | clearAboveRangeColor () |
Removes the currently specified above range color, going back to the default behavior with any value above the current max range gets the max range color. More... | |
bool | belowRangeColor (Color4f *color) const |
Returns true if an below range color is specified, and the color is set in the color parameter. More... | |
void | setBelowRangeColor (const Color4f &color) |
Sets the color to use for values that are below the range of the mapper. More... | |
void | clearBelowRangeColor () |
Removes the currently specified below range color, going back to the default behavior with any value below the current max range gets the min range color. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Maps scalar values to texture coordinates/colors using a continuous/gradient style color map with multiple segments of independent gradients.
This scalar mapper is configured much in the same way as the ScalarMapperFilledContours, but here you are allowed to specify a bottom and top color for each level/segment.
cee::vis::ScalarMapperContinuousPiecewise::ScalarMapperContinuousPiecewise | ( | ) |
Constructs an empty object.
|
virtual |
Maps normalized value (0 -> 1) into a domain value (range_min -> range_max)
Implements cee::vis::ScalarMapperContinuousDomain.
|
virtual |
Maps scalar value to color.
Implements cee::vis::ScalarMapper.
|
virtual |
Maps scalar value to texture coordinate.
Implements cee::vis::ScalarMapper.
|
virtual |
Maps domain value (range_min -> range_max) into a normalized value (0 -> 1)
Implements cee::vis::ScalarMapperContinuousDomain.
double cee::vis::ScalarMapperContinuousPiecewise::rangeMaximum | ( | ) | const |
Returns the maximum range value.
double cee::vis::ScalarMapperContinuousPiecewise::rangeMinimum | ( | ) | const |
Returns the minimum range value.
void cee::vis::ScalarMapperContinuousPiecewise::setup | ( | const std::vector< Color3f > & | colorsFromToArray, |
const std::vector< double > & | tickValuesArray | ||
) |
Sets the scalar mapper from the given tick values array and colors from/to.
The tickValuesArray will contain the values separating each segment of the scalar mapper. The first value in tickValuesArray will be the min value of the scalar mapper, the last value will be the max value of the scalar mapper.
The colorsFromToArray contains bottom and top colors for each of the segments. colorsFromToArray[0] is the bottom of the first segment, colorsFromToArray[1] is the top of the first segment.
The colorsFromToArray.size must be 2*(tickValuesArray.size - 1)
|
virtual |
Updates texture image.
Implements cee::vis::ScalarMapper.
|
virtual |
Returns the version of the scalar mapper. Version is increased whenever the mapper is changed.
Implements cee::vis::ScalarMapperContinuousDomain.