Class ColorMap.Hue<T>

Type Parameters:
T - type of color object: String or MeshLambertMaterial for GWT and Color for JRE
Direct Known Subclasses:
ColorMap3D.Hue, ColorMapCSS.Hue
Enclosing class:
ColorMap<T>

public abstract static class ColorMap.Hue<T> extends ColorMap.Gradient1D<T>
Color gradient following the hue.

The actual data-to-color translation is performed in the super class.

See Also:
  • Constructor Details

    • Hue

      protected Hue(double start, double end, boolean ascending, T[] colors)
      Construct a new Hue color map, starting at a hue of 0.0 (red) up to hue 1.0 (red, again) and interpolate with steps-1 intermediate colors. The resulting gradient spans steps+1 colors. The default range for mapping data values onto the color gradient is [0.0, 1.0].

      Important: Cannot allocate the array for the gradient. Must be handled by subclasses.

      Parameters:
      start - the starting hue
      end - the ending hue
      ascending - the flag to indicate if hue is increasing
      colors - the array to store the hue colors
      See Also:
  • Method Details

    • setHueRange

      public void setHueRange(double start, double end)
      Set hues ranging from start to end in increasing colors. Notes:
      1. If end≤start the colors warp around through red.
      2. The saturation and brightness of the gradient are both maximal.
      Parameters:
      start - the starting hue
      end - the ending hue
    • setHueRange

      public void setHueRange(double start, double end, boolean ascending)
      Set the hues ranging from start to end in increasing or decreasing colors. Notes:
      1. If end≤start the colors warp around through red.
      2. If ascending == false the hue is interpolated in reverse.
      3. The saturation and brightness of the gradient are both maximal.
      Parameters:
      start - the starting hue
      end - the ending hue
      ascending - true to increment the hue value