Package org.jzy3d.colors
Class OrderingStrategyScoreColorMapper
- java.lang.Object
-
- org.jzy3d.colors.ColorMapper
-
- org.jzy3d.colors.OrderingStrategyScoreColorMapper
-
- All Implemented Interfaces:
IColorMappable
public class OrderingStrategyScoreColorMapper extends ColorMapper
AColorMapper
able to compute a coordinate color according to its score computed by the currentGraph
'sAbstractOrderingStrategy
. MethodpreDraw(java.lang.Object)
is overriden to compute eachAbstractDrawables
score with the ordering strategy, so that we have a range. As colormapper may be shared by several components of a singleComposite
, on must provide an update policy to state which objects are allowed to call the re-initilizerpreDraw(java.lang.Object)
method.- Author:
- Martin Pernollet
-
-
Field Summary
Fields Modifier and Type Field Description protected float
off
protected IColorMapperUpdatePolicy
policy
protected Graph
sceneGraph
-
Fields inherited from class org.jzy3d.colors.ColorMapper
colormap, factor, max, min
-
-
Constructor Summary
Constructors Constructor Description OrderingStrategyScoreColorMapper(IColorMap colormap, IColorMapperUpdatePolicy policy, Graph sceneGraph, Color factor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Color
getColor(Coord3d coord)
call a colormap with a three dimensions coordinateprotected int
getNumCoordinates(List<Drawable> drawables, boolean onlyBaryCenter)
void
preDraw(Object o)
A hook method to implement to prepare colormapper for the current draw call.
-
-
-
Field Detail
-
off
protected float off
-
sceneGraph
protected Graph sceneGraph
-
policy
protected IColorMapperUpdatePolicy policy
-
-
Constructor Detail
-
OrderingStrategyScoreColorMapper
public OrderingStrategyScoreColorMapper(IColorMap colormap, IColorMapperUpdatePolicy policy, Graph sceneGraph, Color factor)
-
-
Method Detail
-
preDraw
public void preDraw(Object o)
Description copied from class:ColorMapper
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.- Overrides:
preDraw
in classColorMapper
-
getNumCoordinates
protected int getNumCoordinates(List<Drawable> drawables, boolean onlyBaryCenter)
-
getColor
public Color getColor(Coord3d coord)
Description copied from class:ColorMapper
call a colormap with a three dimensions coordinate- Overrides:
getColor
in classColorMapper
-
-