Package org.evoludo.simulator
Class ColorMap.Hue<T>
Object
ColorMap<T>
ColorMap.Gradient<T>
ColorMap.Gradient1D<T>
Hue<T>
- Type Parameters:
T
- type of color object: String orMeshLambertMaterial
for GWT andColor
for JRE
- Direct Known Subclasses:
ColorMap3D.Hue
,ColorMapCSS.Hue
Color gradient following the hue.
The actual data-to-color translation is performed in the super class.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ColorMap
ColorMap.Gradient<T>, ColorMap.Gradient1D<T>, ColorMap.Gradient2D<T>, ColorMap.GradientND<T>, ColorMap.Hue<T>, ColorMap.Index<T>
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
setHueRange
(double start, double end) Set hues ranging fromstart
toend
in increasing colors.void
setHueRange
(double start, double end, boolean ascending) Set the hues ranging fromstart
toend
in increasing or decreasing colors.Methods inherited from class ColorMap.Gradient1D
binOf, setColor, setColor, setGradient, setGradient, setRange, translate, translate, translate, translate
Methods inherited from class ColorMap.Gradient
interpolateColors, interpolateColors
Methods inherited from class ColorMap
addAlpha, addAlpha, addColors, blendColors, blendColors, color2Color, translate, translate, translate
-
Constructor Details
-
Hue
Construct a new Hue color map, starting at a hue of0.0
(red) up to hue1.0
(red, again) and interpolate withsteps-1
intermediate colors. The resulting gradient spanssteps+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 hueend
- the ending hueascending
- the flag to indicate if hue is increasingcolors
- the array to store the hue colors- See Also:
-
-
Method Details
-
setHueRange
public void setHueRange(double start, double end) Set hues ranging fromstart
toend
in increasing colors. Notes:- If
end≤start
the colors warp around through red. - The saturation and brightness of the gradient are both maximal.
- Parameters:
start
- the starting hueend
- the ending hue
- If
-
setHueRange
public void setHueRange(double start, double end, boolean ascending) Set the hues ranging fromstart
toend
in increasing or decreasing colors. Notes:- If
end≤start
the colors warp around through red. - If
ascending == false
the hue is interpolated in reverse. - The saturation and brightness of the gradient are both maximal.
- Parameters:
start
- the starting hueend
- the ending hueascending
-true
to increment the hue value
- If
-