com.metsci.glimpse.support.colormap
Class ColorMapLinear

java.lang.Object
  extended by 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

Constructor Summary
ColorMapLinear(float min, float max, ColorGradient gradient)
           
 
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
 

Constructor Detail

ColorMapLinear

public ColorMapLinear(float min,
                      float max,
                      ColorGradient gradient)
Method Detail

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.