Package org.evoludo.simulator
Class ColorMap3D.Hue
- Enclosing class:
ColorMap3D
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
ConstructorsConstructorDescriptionHue
(double start, double end, int nIncr) Construct a new Hue color map, starting at huestart
up to hueend
(both in[0.0, 1.0]
) and interpolate withsteps-1
intermediate colors.Hue
(int nIncr) 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. -
Method Summary
Modifier and TypeMethodDescriptioncolor2Color
(Color color) Utility method to convert thecolor
into a color object of typeT
.Methods inherited from class ColorMap.Hue
setHueRange, setHueRange
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, translate, translate, translate
-
Constructor Details
-
Hue
public Hue(int nIncr) 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]
.- Parameters:
nIncr
- the number of intermediate colors- See Also:
-
Hue
public Hue(double start, double end, int nIncr) Construct a new Hue color map, starting at huestart
up to hueend
(both in[0.0, 1.0]
) 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]
.Notes:
- If
end≤start
the colors warp around through red. - If
steps<0
the hue is interpolated in reverse. - The saturation and brightness of the gradient are both maximal.
- Parameters:
start
- the starting hueend
- the ending huenIncr
- the number of intermediate colors- See Also:
- If
-
-
Method Details
-
color2Color
Description copied from class:ColorMap
Utility method to convert thecolor
into a color object of typeT
.- Specified by:
color2Color
in classColorMap<MeshLambertMaterial>
- Parameters:
color
- the color to convert- Returns:
- the color represented as an object of type
T
-