org.jzy3d.colors.colormaps
Class ColorMapGrayscale

java.lang.Object
  extended by org.jzy3d.colors.colormaps.ColorMapGrayscale
All Implemented Interfaces:
IColorMap

public class ColorMapGrayscale
extends Object
implements IColorMap


Constructor Summary
ColorMapGrayscale()
          Creates a new instance of ColorMapGrayscale.
 
Method Summary
 Color getColor(float x, float y, float z, float zMin, float zMax)
           
 Color getColor(IColorMappable colorable, float z)
           
 Color getColor(IColorMappable colorable, float x, float y, float z)
           
 boolean getDirection()
           
 void setDirection(boolean isStandard)
          Indicates if the colormap use the standard or reverted color direction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColorMapGrayscale

public ColorMapGrayscale()
Creates a new instance of ColorMapGrayscale. A ColorMapGrayscale objects provides a color for points standing between a Zmin and Zmax values. The points standing outside these [Zmin;Zmax] boundaries are assigned to the same color than the points standing on the boundaries. The grayscale colormap is a progressive transition from black to white.

Method Detail

setDirection

public void setDirection(boolean isStandard)
Description copied from interface: IColorMap
Indicates if the colormap use the standard or reverted color direction

Specified by:
setDirection in interface IColorMap

getDirection

public boolean getDirection()
Specified by:
getDirection in interface IColorMap
Returns:
the colormap direction: true if standard, false if reverted.

getColor

public Color getColor(IColorMappable colorable,
                      float x,
                      float y,
                      float z)
Specified by:
getColor in interface IColorMap
Parameters:
colorable - A @link ColorMappable object.
Returns:
a color for the given point.

getColor

public Color getColor(float x,
                      float y,
                      float z,
                      float zMin,
                      float zMax)

getColor

public Color getColor(IColorMappable colorable,
                      float z)
Specified by:
getColor in interface IColorMap
Parameters:
colorable - A @link ColorMappable object.
z - the variable that is Color-dependent, and can be independent of the coordinates.
Returns:
a color for the given point.