# ScalarMapperContinuous

class `cee.``ScalarMapperContinuous`()

  Maps scalar values to texture coordinates/colors using a filled contours style color map with levels of uniform size.

  To show a color legend in the view representing this mapper, use the `Overlay.addCustomColorLegendForScalarMapper` function.

Constructors

- `constructor`

Accessors

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

Methods

- `createTexture`
- `domainValue`
- `mapToColor`
- `mapToTextureCoordinate`
- `normalizedValue`
- `setColors`
- `setColorsAtValues`
- `setColorsFromColorTable`
- `setRange`
- `setRangeLogarithmic`
- `tickValuesHint`
- `version`

## Constructors

`ScalarMapperContinuous.``constructor`()

  Return type: | ScalarMapperContinuous

## Accessors

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

`ScalarMapperContinuous.``aboveRangeColor`(color)

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

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

`ScalarMapperContinuous.``belowRangeColor`(color)

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

`ScalarMapperContinuous.``logarithmic`()

  True if the mapper is setup to logarithmic mapping

  Return type: | boolean

`ScalarMapperContinuous.``rangeMaximum`()

  The maximum range of the mapper

  Return type: | number

`ScalarMapperContinuous.``rangeMinimum`()

  The minimum range of the mapper

  Return type: | number

`ScalarMapperContinuous.``undefinedColor`()

  The color used for undefined values.

  Return type: | Color4Like

`ScalarMapperContinuous.``undefinedColor`(color)

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

## Methods

### createTexture

`ScalarMapperContinuous.``createTexture`()

  Creates and returns texture for this scalar mapper

  Return type: | Texture

### domainValue

`ScalarMapperContinuous.``domainValue`(normalizedPosition)

  Arguments: | normalizedPosition (`number`) – None

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

  Return type: | number

### mapToColor

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

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

`ScalarMapperContinuous.``normalizedValue`(domainValue)

  Arguments: | domainValue (`number`) – None

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

  Return type: | number

### setColors

`ScalarMapperContinuous.``setColors`(colors)

  Arguments: | colors (`[Color4Like]`) – None
  Return type: | void

### setColorsAtValues

`ScalarMapperContinuous.``setColorsAtValues`(colorArr, valueArr)

  Arguments: | colorArr (`ArrayLike`) – None valueArr (`ArrayLike`) – None
  Return type: | void

### setColorsFromColorTable

`ScalarMapperContinuous.``setColorsFromColorTable`(colorTable)

  Arguments: | colorTable (`ColorTable`) – None
  Return type: | void

### setRange

`ScalarMapperContinuous.``setRange`(min, max)

  Arguments: | min (`number`) – None max (`number`) – None

  Sets the range of the mapper. The mapper will map domain values to colors based on an even distribution between the given min and max values.

  Return type: | void

### setRangeLogarithmic

`ScalarMapperContinuous.``setRangeLogarithmic`(min, max)

  Arguments: | min (`number`) – None max (`number`) – None

  Sets a logarithmic range of the mapper.

  Return type: | void

### tickValuesHint

`ScalarMapperContinuous.``tickValuesHint`()

  Return type: | ArrayLike <number>

### version

`ScalarMapperContinuous.``version`()

  Return type: | number

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Envision for Web 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...