Package org.jzy3d.colors
Class ColorMapper
java.lang.Object
org.jzy3d.colors.ColorMapper
- All Implemented Interfaces:
IColorMappable
- Direct Known Subclasses:
OrderingStrategyScoreColorMapper
A
ColorMapper
uses a IColorMap
to process a color for a given Coord3d
.
An optional global color factor let you filter the Color
computed by the colormap:
public Color getColor(Coord3d coord){
Color out = colormap.getColor(this, v);
if(factor!=null)
out.mul(factor);
}
- Author:
- Martin Pernollet
-
Field Summary
-
Constructor Summary
ConstructorDescriptionColorMapper
(ColorMapper colormapper, Color factor) ColorMapper
(IColorMap colormap, double min, double max) ColorMapper
(IColorMap colormap, double min, double max, Color factor) ColorMapper
(IColorMap colormap, Color factor) ColorMapper
(IColorMap colormap, Range range) ColorMapper
(IColorMap colormap, Drawable drawable) ColorMapper
(IColorMap colormap, Drawable drawable, Color factor) -
Method Summary
Modifier and TypeMethodDescriptiongetColor
(double v) call a colormap with a single dimension coordinatecall a colormap with a three dimensions coordinatedouble
getMax()
Retrieve the upper value boundary for aIColorMap
.double
getMin()
Retrieve the lower value boundary for aIColorMap
.getRange()
getScale()
void
void
A hook method to implement to prepare colormapper for the current draw call.void
setMax
(double value) Set the upper value boundary for aIColorMap
.void
setMin
(double value) Set the lower value boundary for aIColorMap
.void
void
toString()
-
Field Details
-
min
protected double min -
max
protected double max -
colormap
-
factor
-
-
Constructor Details
-
ColorMapper
public ColorMapper() -
ColorMapper
-
ColorMapper
-
ColorMapper
-
ColorMapper
-
ColorMapper
-
ColorMapper
-
ColorMapper
-
-
Method Details
-
getColor
call a colormap with a three dimensions coordinate -
getColor
call a colormap with a single dimension coordinate -
preDraw
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. -
postDraw
-
getColorMap
-
getMin
public double getMin()Description copied from interface:IColorMappable
Retrieve the lower value boundary for aIColorMap
.- Specified by:
getMin
in interfaceIColorMappable
- Returns:
- the minimum Z value
-
getMax
public double getMax()Description copied from interface:IColorMappable
Retrieve the upper value boundary for aIColorMap
.- Specified by:
getMax
in interfaceIColorMappable
- Returns:
- the maximum Z value
-
setMin
public void setMin(double value) Description copied from interface:IColorMappable
Set the lower value boundary for aIColorMap
.- Specified by:
setMin
in interfaceIColorMappable
- Parameters:
value
- the minimum Z value
-
setMax
public void setMax(double value) Description copied from interface:IColorMappable
Set the upper value boundary for aIColorMap
.- Specified by:
setMax
in interfaceIColorMappable
- Parameters:
value
- the maximum Z value
-
setRange
-
getRange
-
setScale
-
getScale
-
toString
-