class ScalarMapper : public RefCountedObject

Abstract base class for scalar mappers.

The scalar mapper offers two services:

  • Map from a scalar value (domain value) to a texture coordinate or a color

  • Create a texture from the scalar mapper that can be used for rendering and corresponds with the texture coordinates produced.

Subclassed by ScalarMapperContinuousDomain

Public Functions

virtual Vec2f mapToTextureCoordinate(double scalarValue) const = 0

Maps scalar value to texture coordinate.

virtual Color3f mapToColor(double scalarValue) const = 0

Maps scalar value to color.

virtual bool updateTexture(Image *image) const = 0

Updates texture image based on the settings in the scalar mapper.