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 orMeshLambertMaterialfor GWT andColorfor 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 TypeMethodDescriptionvoidsetHueRange(double start, double end) Set hues ranging fromstarttoendin increasing colors.voidsetHueRange(double start, double end, boolean ascending) Set the hues ranging fromstarttoendin increasing or decreasing colors.Methods inherited from class ColorMap.Gradient1D
binOf, setColor, setColor, setGradient, setGradient, setRange, translate, translate, translate, translateMethods inherited from class ColorMap.Gradient
interpolateColors, interpolateColorsMethods inherited from class ColorMap
addAlpha, addAlpha, addColors, blendColors, blendColors, color2Color, 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-1intermediate colors. The resulting gradient spanssteps+1colors. 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 fromstarttoendin increasing colors. Notes:- If
end≤startthe 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 fromstarttoendin increasing or decreasing colors. Notes:- If
end≤startthe colors warp around through red. - If
ascending == falsethe hue is interpolated in reverse. - The saturation and brightness of the gradient are both maximal.
- Parameters:
start- the starting hueend- the ending hueascending-trueto increment the hue value
- If
-