# 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

- `constructor`

Accessors

- `aboveRangeColor`
- `belowRangeColor`
- `rangeMaximum`
- `rangeMinimum`
- `undefinedColor`

Methods

- `createTexture`
- `domainValue`
- `mapToColor`
- `mapToTextureCoordinate`
- `normalizedValue`
- `setup`
- `tickValuesHint`
- `version`

## Constructors

`ScalarMapperContinuousPiecewise.``constructor`()

  Return type: | ScalarMapperContinuousPiecewise

## Accessors

`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.

  Return type: | Color4Like

`ScalarMapperContinuousPiecewise.``aboveRangeColor`(color)

  Arguments: | color (`Color4Like`) – None
  Return type: | void

`ScalarMapperContinuousPiecewise.``belowRangeColor`()

  The color to assign values that are below the given range.

  Default is null, which indicates that the first color in the color array will be used.

  Return type: | Color4Like

`ScalarMapperContinuousPiecewise.``belowRangeColor`(color)

  Arguments: | color (`Color4Like`) – None
  Return type: | void

`ScalarMapperContinuousPiecewise.``rangeMaximum`()

  The maximum range of the mapper

  Return type: | number

`ScalarMapperContinuousPiecewise.``rangeMinimum`()

  The minimum range of the mapper

  Return type: | number

`ScalarMapperContinuousPiecewise.``undefinedColor`()

  The color used for undefined values.

  Return type: | Color4Like

`ScalarMapperContinuousPiecewise.``undefinedColor`(color)

  Arguments: | color (`Color4Like`) – None
  Return type: | void

## Methods

### createTexture

`ScalarMapperContinuousPiecewise.``createTexture`()

  Creates and returns texture for this scalar mapper

  Return type: | Texture

### domainValue

`ScalarMapperContinuousPiecewise.``domainValue`(normalizedPosition)

  Arguments: | normalizedPosition (`number`) – None

  Map normalized value (0 -> 1) into a domain value (range_min -> range_max)

  Return type: | number

### mapToColor

`ScalarMapperContinuousPiecewise.``mapToColor`(scalarValue)

  Arguments: | scalarValue (`number`) – None

  Maps the given domain value to a color using the current range and color array.

  Return type: | Color4Like

### mapToTextureCoordinate

`ScalarMapperContinuousPiecewise.``mapToTextureCoordinate`(scalarValue)

  Arguments: | scalarValue (`number`) – None

  Maps the given domain value to a color using the current range and color array.

  Return type: | Vec2Like

### normalizedValue

`ScalarMapperContinuousPiecewise.``normalizedValue`(domainValue)

  Arguments: | domainValue (`number`) – None

  Map domain value (range_min -> range_max) into a normalized value (0 -> 1)

  Return type: | number

### setup

`ScalarMapperContinuousPiecewise.``setup`(colorsFromToArray, tickValuesArray)

  Arguments: | colorsFromToArray (`ArrayLike`) – None tickValuesArray (`ArrayLike`) – None

  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.length - 1)

  Return type: | void

### tickValuesHint

`ScalarMapperContinuousPiecewise.``tickValuesHint`()

  Return type: | ArrayLike <number>

### version

`ScalarMapperContinuousPiecewise.``version`()

  Return type: | number

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Web in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...