public class BarycentreOrderingStrategy extends AbstractOrderingStrategy
BarycentreOrderingStrategy
compare two AbstractDrawable
s 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, sort
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
public BarycentreOrderingStrategy()
public BarycentreOrderingStrategy(View view)
public int compare(AbstractDrawable d1, AbstractDrawable d2)
public double score(AbstractDrawable d)
AbstractOrderingStrategy
score
in class AbstractOrderingStrategy
public double score(Coord3d coord)
score
in class AbstractOrderingStrategy
Copyright © 2016. All rights reserved.