.. role:: ts-api-decorator

######################
ScalarMapperContinuous
######################

.. js:module:: cee
   :noindex:

.. container:: ts-api-section

   .. js:class:: 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.



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~cee.ScalarMapperContinuous.constructor`



.. container:: api-index-section

   .. rubric:: Accessors

   .. rst-class:: api-index-list-item api-kind-accessor api-parent-kind-class

   * :js:attr:`~cee.ScalarMapperContinuous.aboveRangeColor`
   * :js:attr:`~cee.ScalarMapperContinuous.belowRangeColor`
   * :js:attr:`~cee.ScalarMapperContinuous.logarithmic`
   * :js:attr:`~cee.ScalarMapperContinuous.rangeMaximum`
   * :js:attr:`~cee.ScalarMapperContinuous.rangeMinimum`
   * :js:attr:`~cee.ScalarMapperContinuous.undefinedColor`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~cee.ScalarMapperContinuous.createTexture`
   * :js:meth:`~cee.ScalarMapperContinuous.domainValue`
   * :js:meth:`~cee.ScalarMapperContinuous.mapToColor`
   * :js:meth:`~cee.ScalarMapperContinuous.mapToTextureCoordinate`
   * :js:meth:`~cee.ScalarMapperContinuous.normalizedValue`
   * :js:meth:`~cee.ScalarMapperContinuous.setColors`
   * :js:meth:`~cee.ScalarMapperContinuous.setColorsAtValues`
   * :js:meth:`~cee.ScalarMapperContinuous.setColorsFromColorTable`
   * :js:meth:`~cee.ScalarMapperContinuous.setRange`
   * :js:meth:`~cee.ScalarMapperContinuous.setRangeLogarithmic`
   * :js:meth:`~cee.ScalarMapperContinuous.tickValuesHint`
   * :js:meth:`~cee.ScalarMapperContinuous.version`





------------

Constructors
============

.. container:: ts-api-section

   .. js:function:: ScalarMapperContinuous.constructor()



      :rtype: ScalarMapperContinuous



Accessors
=========

.. container:: ts-api-section

   .. js:function:: 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.


      :rtype: Color4Like

   .. js:function:: ScalarMapperContinuous.aboveRangeColor( color)

      :param color: None
      :type color: Color4Like


      :rtype: void



.. container:: ts-api-section

   .. js:function:: 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.


      :rtype: Color4Like

   .. js:function:: ScalarMapperContinuous.belowRangeColor( color)

      :param color: None
      :type color: Color4Like


      :rtype: void



.. container:: ts-api-section

   .. js:function:: ScalarMapperContinuous.logarithmic()



      True if the mapper is setup to logarithmic mapping


      :rtype: boolean



.. container:: ts-api-section

   .. js:function:: ScalarMapperContinuous.rangeMaximum()



      The maximum range of the mapper


      :rtype: number



.. container:: ts-api-section

   .. js:function:: ScalarMapperContinuous.rangeMinimum()



      The minimum range of the mapper


      :rtype: number



.. container:: ts-api-section

   .. js:function:: ScalarMapperContinuous.undefinedColor()



      The color used for undefined values.


      :rtype: Color4Like

   .. js:function:: ScalarMapperContinuous.undefinedColor( color)

      :param color: None
      :type color: Color4Like


      :rtype: void



Methods
=======

.. rst-class:: ts-api-section

createTexture
-------------

.. js:method:: ScalarMapperContinuous.createTexture()



   Creates and returns texture for this scalar mapper


   :rtype: Texture

.. rst-class:: ts-api-section

domainValue
-----------

.. js:method:: ScalarMapperContinuous.domainValue( normalizedPosition)

   :param normalizedPosition: None
   :type normalizedPosition: number


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


   :rtype: number

.. rst-class:: ts-api-section

mapToColor
----------

.. js:method:: ScalarMapperContinuous.mapToColor( scalarValue)

   :param scalarValue: None
   :type scalarValue: number


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


   :rtype: Color4Like

.. rst-class:: ts-api-section

mapToTextureCoordinate
----------------------

.. js:method:: ScalarMapperContinuous.mapToTextureCoordinate( scalarValue)

   :param scalarValue: None
   :type scalarValue: number


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


   :rtype: Vec2Like

.. rst-class:: ts-api-section

normalizedValue
---------------

.. js:method:: ScalarMapperContinuous.normalizedValue( domainValue)

   :param domainValue: None
   :type domainValue: number


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


   :rtype: number

.. rst-class:: ts-api-section

setColors
---------

.. js:method:: ScalarMapperContinuous.setColors( colors)

   :param colors: None
   :type colors: [Color4Like]


   :rtype: void

.. rst-class:: ts-api-section

setColorsAtValues
-----------------

.. js:method:: ScalarMapperContinuous.setColorsAtValues( colorArr, valueArr)

   :param colorArr: None
   :type colorArr: ArrayLike <Color4Like>
   :param valueArr: None
   :type valueArr: ArrayLike <number>


   :rtype: void

.. rst-class:: ts-api-section

setColorsFromColorTable
-----------------------

.. js:method:: ScalarMapperContinuous.setColorsFromColorTable( colorTable)

   :param colorTable: None
   :type colorTable: ColorTable


   :rtype: void

.. rst-class:: ts-api-section

setRange
--------

.. js:method:: ScalarMapperContinuous.setRange( min, max)

   :param min: None
   :type min: number
   :param max: None
   :type max: number


   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.


   :rtype: void

.. rst-class:: ts-api-section

setRangeLogarithmic
-------------------

.. js:method:: ScalarMapperContinuous.setRangeLogarithmic( min, max)

   :param min: None
   :type min: number
   :param max: None
   :type max: number


   Sets a logarithmic range of the mapper.


   :rtype: void

.. rst-class:: ts-api-section

tickValuesHint
--------------

.. js:method:: ScalarMapperContinuous.tickValuesHint()



   :rtype: ArrayLike <number>

.. rst-class:: ts-api-section

version
-------

.. js:method:: ScalarMapperContinuous.version()



   :rtype: number

