Maps scalar values to texture coordinates/colors using a filled contours style with user defined contour/color-change values. More...
Public Member Functions | |
ScalarMapperFilledContours () | |
Constructs an empty object. More... | |
double | rangeMinimum () const |
Returns the minimum range value. More... | |
double | rangeMaximum () const |
Returns the maximum range value. More... | |
void | setColorsAtValues (const std::vector< Color3f > &colorArray, std::vector< double > values) |
Sets the scalar mapper level colors from an array of colors. 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 number of the mapper. Version is increased whenever the mapper is modified. 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 filled contours style with user defined contour/color-change values.
You setup the mapper by providing an array of contour/level values, and an array of the color of the level using the setColorsAtValues() method. The first value in the values array will be the minimum value of the mapper, and the last value in the array will be the maximum value. The number of colors specified must be one less than the number of values.
Note that there is no way to set the min/max value of this mapper.
cee::vis::ScalarMapperFilledContours::ScalarMapperFilledContours | ( | ) |
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::ScalarMapperFilledContours::rangeMaximum | ( | ) | const |
Returns the maximum range value.
double cee::vis::ScalarMapperFilledContours::rangeMinimum | ( | ) | const |
Returns the minimum range value.
void cee::vis::ScalarMapperFilledContours::setColorsAtValues | ( | const std::vector< Color3f > & | colorArray, |
std::vector< double > | values | ||
) |
Sets the scalar mapper level colors from an array of colors.
|
virtual |
Returns a suggestion for which tick marks to use. The base class returns an empty array.
Reimplemented from cee::vis::ScalarMapperContinuousDomain.
|
virtual |
Updates texture image.
Implements cee::vis::ScalarMapper.
|
virtual |
Returns the version number of the mapper. Version is increased whenever the mapper is modified.
Implements cee::vis::ScalarMapperContinuousDomain.