ScalarMapperContinuousPiecewise
- class cee.ScalarMapperContinuousPiecewise()
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.
Constructors
Methods
Constructors
constructor
- cee.ScalarMapperContinuousPiecewise.constructor()
- Return type
cee.ScalarMapperContinuousPiecewise
Accessors
- cee.ScalarMapperContinuousPiecewise.aboveRangeColor
The color to assign values that are above the given range.
Default is undefined, which indicates that the last color in the color array will be used.
- cee.ScalarMapperContinuousPiecewise.belowRangeColor
The color to assign values that are below the given range.
Default is undefined, which indicates that the first color in the color array will be used.
- cee.ScalarMapperContinuousPiecewise.rangeMaximum
The maximum range of the mapper
- cee.ScalarMapperContinuousPiecewise.rangeMinimum
The minimum range of the mapper
- cee.ScalarMapperContinuousPiecewise.undefinedColor
The color used for undefined values.
Default is undefined, which indicates that the last color in the color array will be used.
Methods
createTexture
- cee.ScalarMapperContinuousPiecewise.createTexture()
Creates and returns texture for this scalar mapper
- Return type
cee.Texture
domainValue
- cee.ScalarMapperContinuousPiecewise.domainValue(normalizedPosition)
Map normalized value (0 -> 1) into a domain value (range_min -> range_max)
- Arguments
normalizedPosition (
number
) –
- Return type
number
mapToColor
- cee.ScalarMapperContinuousPiecewise.mapToColor(scalarValue)
Maps the given domain value to a color using the current range and color array.
- Arguments
scalarValue (
number
) –
- Return type
cee.Color4Like
mapToTextureCoordinate
- cee.ScalarMapperContinuousPiecewise.mapToTextureCoordinate(scalarValue)
Maps the given domain value to a color using the current range and color array.
- Arguments
scalarValue (
number
) –
- Return type
cee.Vec2Like
normalizedValue
- cee.ScalarMapperContinuousPiecewise.normalizedValue(domainValue)
Map domain value (range_min -> range_max) into a normalized value (0 -> 1)
- Arguments
domainValue (
number
) –
- Return type
number
setup
- cee.ScalarMapperContinuousPiecewise.setup(colorsFromToArray, tickValuesArray)
Sets the scalar mapper from the given tick values array and colors from/to
- Arguments
colorsFromToArray (
ArrayLike[cee.Color4Like]
) –tickValuesArray (
ArrayLike[number]
) –
- Return type
void
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.length - 1)
tickValuesHint
- cee.ScalarMapperContinuousPiecewise.tickValuesHint()
- Return type
ArrayLike[number]
version
- cee.ScalarMapperContinuousPiecewise.version()
- Return type
number