com.metsci.glimpse.support.colormap
Class ColorMapLinear
java.lang.Object
com.metsci.glimpse.support.colormap.ColorMapLinear
- All Implemented Interfaces:
- ColorMap
- Direct Known Subclasses:
- ColorMapLog
public class ColorMapLinear
- extends java.lang.Object
- implements ColorMap
A ColorMap
which linearly interpolates the provided
ColorGradient
over the provided data bounds. If values
outside of the bounds are provided, the returned color will
simply saturate at one end of the ColorGradient
.
- Author:
- hogye
Method Summary |
void |
toColor(float value,
float[] rgba)
Computes the color to be used to display the given value,
and stores the color in the rgba array. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColorMapLinear
public ColorMapLinear(float min,
float max,
ColorGradient gradient)
toColor
public void toColor(float value,
float[] rgba)
- Description copied from interface:
ColorMap
- Computes the color to be used to display the given value,
and stores the color in the rgba array. The rgba array must
be a pre-allocated float array of length >= 4.
- Specified by:
toColor
in interface ColorMap
Copyright © 2012 Metron, Inc.. All Rights Reserved.