public class ColorMapper extends Object implements IColorMappable
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);
}
Modifier and Type | Field and Description |
---|---|
protected IColorMap |
colormap |
protected Color |
factor |
protected double |
max |
protected double |
min |
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) |
Modifier and Type | Method and Description |
---|---|
Color |
getColor(Coord3d coord)
call a colormap with a three dimensions coordinate
|
Color |
getColor(double v)
call a colormap with a single dimension coordinate
|
IColorMap |
getColorMap() |
double |
getMax()
Retrieve the upper value boundary for a
IColorMap . |
double |
getMin()
Retrieve the lower value boundary for a
IColorMap . |
Range |
getRange() |
Scale |
getScale() |
void |
postDraw(Object o) |
void |
preDraw(Object o)
A hook method to implement to prepare colormapper for the current draw
call.
|
void |
setMax(double value)
Set the upper value boundary for a
IColorMap . |
void |
setMin(double value)
Set the lower value boundary for a
IColorMap . |
void |
setRange(Range range) |
void |
setScale(Scale range) |
String |
toString() |
protected double min
protected double max
protected IColorMap colormap
protected Color factor
public ColorMapper()
public ColorMapper(IColorMap colormap, double min, double max)
public ColorMapper(ColorMapper colormapper, Color factor)
public Color getColor(double v)
public void preDraw(Object o)
IColorMapperUpdatePolicy}
public void postDraw(Object o)
public IColorMap getColorMap()
public double getMin()
IColorMappable
IColorMap
.getMin
in interface IColorMappable
public double getMax()
IColorMappable
IColorMap
.getMax
in interface IColorMappable
public void setMin(double value)
IColorMappable
IColorMap
.setMin
in interface IColorMappable
value
- the minimum Z valuepublic void setMax(double value)
IColorMappable
IColorMap
.setMax
in interface IColorMappable
value
- the maximum Z valuepublic void setRange(Range range)
public Range getRange()
public void setScale(Scale range)
public Scale getScale()
Copyright © 2016. All rights reserved.