Class AbstractOrderingStrategy
- java.lang.Object
-
- org.jzy3d.plot3d.rendering.ordering.AbstractOrderingStrategy
-
- All Implemented Interfaces:
Comparator<Drawable>
- Direct Known Subclasses:
BarycentreOrderingStrategy
,DefaultOrderingStrategy
public abstract class AbstractOrderingStrategy extends Object implements Comparator<Drawable>
An ordering strategy is aComparator
forDrawable
s that may compute the priority betweenDrawable
s d1 and d2.- Author:
- Martin Pernollet
-
-
Constructor Summary
Constructors Constructor Description AbstractOrderingStrategy()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected int
comparison(double dist1, double dist2)
Return the opposite of closest distance, so that closest distance is sorted after farest distance.Camera
getCamera()
Transform
getTransform()
View
getView()
abstract double
score(Coord3d coord)
abstract double
score(Drawable drawable)
Returns a score for ranking this drawable among other drawables of the scenegraph.void
setAll(Camera camera, Transform transform)
void
setCamera(Camera camera)
void
setTransform(Transform transform)
void
setView(View view)
void
sort(List<Drawable> monotypes, Camera cam)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
compare, equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
score
public abstract double score(Drawable drawable)
Returns a score for ranking this drawable among other drawables of the scenegraph.
-
score
public abstract double score(Coord3d coord)
-
comparison
protected int comparison(double dist1, double dist2)
Return the opposite of closest distance, so that closest distance is sorted after farest distance.
-
getCamera
public Camera getCamera()
-
setCamera
public void setCamera(Camera camera)
-
getTransform
public Transform getTransform()
-
setTransform
public void setTransform(Transform transform)
-
getView
public View getView()
-
setView
public void setView(View view)
-
-