cee::vis::ScalarMapperContinuousDomain Class Referenceabstract

Base class for scalar mappers that implement normalizedValue / domainValue. More...

Public Member Functions

virtual double normalizedValue (double domainValue) const =0
 Returns the normalized value. More...
 
virtual double domainValue (double normalizedPosition) const =0
 Returns the domain value. More...
 
virtual unsigned int version () const =0
 Returns the version. 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...
 
- Public Member Functions inherited from cee::vis::ScalarMapper
virtual Vec2f mapToTextureCoordinate (double scalarValue) const =0
 Maps scalar value to texture coordinate. More...
 
virtual Color3f mapToColor (double scalarValue) const =0
 Maps scalar value to color. More...
 
virtual bool updateTexture (Image *image) const =0
 Updates texture image based on the settings in the scalar mapper. More...
 
- Public Member Functions inherited from cee::RefCountedObject
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...
 
Inheritance diagram for cee::vis::ScalarMapperContinuousDomain:
cee::vis::ScalarMapper cee::RefCountedObject cee::vis::ScalarMapperContinuous cee::vis::ScalarMapperContinuousPiecewise cee::vis::ScalarMapperFilledContours cee::vis::ScalarMapperFilledContoursUniform

Detailed Description

Base class for scalar mappers that implement normalizedValue / domainValue.

Abstract base class for continuous domain mappers, that is mappers that support conversion between a domain value and a normalized value.

The class also adds a versioning scheme as well as a way for the scalar mapper to give the color legend a hint for tick marks (useful for filled contour type legends).

Member Function Documentation

bool cee::vis::ScalarMapperContinuousDomain::aboveRangeColor ( Color4f color) const

Returns true if an above range color is specified, and the color is set in the color parameter.

bool cee::vis::ScalarMapperContinuousDomain::belowRangeColor ( Color4f color) const

Returns true if an below range color is specified, and the color is set in the color parameter.

void cee::vis::ScalarMapperContinuousDomain::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.

void cee::vis::ScalarMapperContinuousDomain::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.

cee::vis::ScalarMapperContinuousDomain::domainValue ( double  normalizedPosition) const
pure virtual
cee::vis::ScalarMapperContinuousDomain::normalizedValue ( double  domainValue) const
pure virtual
void cee::vis::ScalarMapperContinuousDomain::setAboveRangeColor ( const Color4f color)

Sets the color to use for values that are above the range of the mapper.

This feature is disabled by default, so all values above the range will get the same as max range

void cee::vis::ScalarMapperContinuousDomain::setBelowRangeColor ( const Color4f color)

Sets the color to use for values that are below the range of the mapper.

This feature is disabled by default, so all values below the range will get the same as min range

void cee::vis::ScalarMapperContinuousDomain::setUndefinedColor ( const Color4f color)

Sets the color to use for undefined values (cee::UNDEFINED_DOUBLE)

std::vector< double > cee::vis::ScalarMapperContinuousDomain::tickValuesHint ( ) const
virtual

Returns a suggestion for which tick marks to use. The base class returns an empty array.

Reimplemented in cee::vis::ScalarMapperFilledContoursUniform, and cee::vis::ScalarMapperFilledContours.

Color4f cee::vis::ScalarMapperContinuousDomain::undefinedColor ( ) const

Returns the current undefined color.

cee::vis::ScalarMapperContinuousDomain::version ( ) const
pure virtual