org.jzy3d.colors
Class ColorMapper

java.lang.Object
  extended by org.jzy3d.colors.ColorMapper
All Implemented Interfaces:
IColorMappable

public class ColorMapper
extends java.lang.Object
implements IColorMappable

A ColorMapper is a IColorMappable and a IColorMap at the same time. It allows getting a color from a Coord3d instead of attaching a IColorMap to a IColorMappable object.

Author:
Martin Pernollet

Constructor Summary
ColorMapper(ColorMapper colormapper, Color factor)
           
ColorMapper(IColorMap colormap, float zmin, float zmax)
           
ColorMapper(IColorMap colormap, float zmin, float zmax, Color factor)
           
 
Method Summary
 Color getColor(Coord3d coord)
           
 Color getColor(float v)
           
 IColorMap getColorMap()
           
 Range getRange()
           
 Scale getScale()
           
 float getZMax()
          Retrieve the upper value boundary for a IColorMap.
 float getZMin()
          Retrieve the lower value boundary for a IColorMap.
 void setRange(Range range)
           
 void setScale(Scale range)
           
 void setZMax(float value)
          Set the upper value boundary for a IColorMap.
 void setZMin(float value)
          Set the lower value boundary for a IColorMap.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColorMapper

public ColorMapper(IColorMap colormap,
                   float zmin,
                   float zmax)

ColorMapper

public ColorMapper(IColorMap colormap,
                   float zmin,
                   float zmax,
                   Color factor)

ColorMapper

public ColorMapper(ColorMapper colormapper,
                   Color factor)
Method Detail

getColor

public Color getColor(Coord3d coord)

getColor

public Color getColor(float v)

getColorMap

public IColorMap getColorMap()

getZMin

public float getZMin()
Description copied from interface: IColorMappable
Retrieve the lower value boundary for a IColorMap.

Specified by:
getZMin in interface IColorMappable
Returns:
the minimum Z value

getZMax

public float getZMax()
Description copied from interface: IColorMappable
Retrieve the upper value boundary for a IColorMap.

Specified by:
getZMax in interface IColorMappable
Returns:
the maximum Z value

setZMin

public void setZMin(float value)
Description copied from interface: IColorMappable
Set the lower value boundary for a IColorMap.

Specified by:
setZMin in interface IColorMappable
Parameters:
value - the minimum Z value

setZMax

public void setZMax(float value)
Description copied from interface: IColorMappable
Set the upper value boundary for a IColorMap.

Specified by:
setZMax in interface IColorMappable
Parameters:
value - the maximum Z value

setRange

public void setRange(Range range)

getRange

public Range getRange()

setScale

public void setScale(Scale range)

getScale

public Scale getScale()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object