public class BarycentreOrderingStrategy extends AbstractOrderingStrategy
BarycentreOrderingStrategy compare two AbstractDrawables by computing
their respective distances to the Camera, which must be referenced prior to any
comparison.| Constructor and Description |
|---|
BarycentreOrderingStrategy() |
BarycentreOrderingStrategy(View view) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(AbstractDrawable d1,
AbstractDrawable d2)
Operation must be:
symetric: compare(a,b)=-compare(b,a)
transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0 true if all Drawables and the Camera don't change position!
|
double |
score(AbstractDrawable d)
Returns a score for ranking this drawable among other drawables of the scenegraph.
|
double |
score(Coord3d coord) |
comparison, getCamera, getGl, getGlu, getTransform, getView, setAll, setCamera, setGl, setGlu, setTransform, setView, sortclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongpublic BarycentreOrderingStrategy()
public BarycentreOrderingStrategy(View view)
public int compare(AbstractDrawable d1, AbstractDrawable d2)
public double score(AbstractDrawable d)
AbstractOrderingStrategyscore in class AbstractOrderingStrategypublic double score(Coord3d coord)
score in class AbstractOrderingStrategyCopyright © 2016. All rights reserved.