org.jzy3d.colors
Class ColorMapper
- java.lang.Object
-
- org.jzy3d.colors.ColorMapper
-
- All Implemented Interfaces:
- IColorMappable
- Direct Known Subclasses:
- OrderingStrategyScoreColorMapper
public class ColorMapper extends java.lang.Object implements IColorMappable
AColorMapperuses aIColorMapto process a color for a givenCoord3d. An optional global color factor let you filter theColorcomputed by the colormap:public Color getColor(Coord3d coord){ Color out = colormap.getColor(this, v); if(factor!=null) out.mul(factor); }
-
-
Constructor Summary
Constructors Constructor and Description ColorMapper()ColorMapper(ColorMapper colormapper, Color factor)ColorMapper(IColorMap colormap, Color factor)ColorMapper(IColorMap colormap, double min, double max)ColorMapper(IColorMap colormap, double min, double max, Color factor)ColorMapper(IColorMap colormap, Range range)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ColorgetColor(Coord3d coord)call a colormap with a three dimensions coordinateColorgetColor(double v)call a colormap with a single dimension coordinateIColorMapgetColorMap()doublegetMax()Retrieve the upper value boundary for aIColorMap.doublegetMin()Retrieve the lower value boundary for aIColorMap.RangegetRange()ScalegetScale()voidpostDraw(java.lang.Object o)voidpreDraw(java.lang.Object o)A hook method to implement to prepare colormapper for the current draw call.voidsetMax(double value)Set the upper value boundary for aIColorMap.voidsetMin(double value)Set the lower value boundary for aIColorMap.voidsetRange(Range range)voidsetScale(Scale range)java.lang.StringtoString()
-
-
-
Constructor Detail
-
ColorMapper
public ColorMapper()
-
ColorMapper
public ColorMapper(IColorMap colormap, double min, double max)
-
ColorMapper
public ColorMapper(ColorMapper colormapper, Color factor)
-
-
Method Detail
-
getColor
public Color getColor(double v)
call a colormap with a single dimension coordinate
-
preDraw
public void preDraw(java.lang.Object o)
A hook method to implement to prepare colormapper for the current draw call. The input parameter o must be the object calling preDraw. Indeed, the mapper is supposed to be able to check wether preDraw is actually allowed for the caller.- See Also:
IColorMapperUpdatePolicy}
-
postDraw
public void postDraw(java.lang.Object o)
-
getColorMap
public IColorMap getColorMap()
-
getMin
public double getMin()
Description copied from interface:IColorMappableRetrieve the lower value boundary for aIColorMap.- Specified by:
getMinin interfaceIColorMappable- Returns:
- the minimum Z value
-
getMax
public double getMax()
Description copied from interface:IColorMappableRetrieve the upper value boundary for aIColorMap.- Specified by:
getMaxin interfaceIColorMappable- Returns:
- the maximum Z value
-
setMin
public void setMin(double value)
Description copied from interface:IColorMappableSet the lower value boundary for aIColorMap.- Specified by:
setMinin interfaceIColorMappable- Parameters:
value- the minimum Z value
-
setMax
public void setMax(double value)
Description copied from interface:IColorMappableSet the upper value boundary for aIColorMap.- Specified by:
setMaxin interfaceIColorMappable- 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:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG