Class BarycentreOrderingStrategy
java.lang.Object
org.jzy3d.plot3d.rendering.ordering.AbstractOrderingStrategy
org.jzy3d.plot3d.rendering.ordering.BarycentreOrderingStrategy
- All Implemented Interfaces:
Comparator<Drawable>
The
BarycentreOrderingStrategy compare two Drawables by computing their
respective distances to the Camera, which must be referenced prior to any comparison.- Author:
- Martin Pernollet
-
Field Summary
Fields inherited from class org.jzy3d.plot3d.rendering.ordering.AbstractOrderingStrategy
camera, transform, view -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintOperation must be: symetric: compare(a,b)=-compare(b,a) transitive: ((compare(x, y)>0) invalid input: '&'invalid input: '&' (compare(y, z)>0)) implies compare(x, z)>0 true if all Drawables and the Camera don't change position!doubledoubleReturns a score for ranking this drawable among other drawables of the scenegraph.Methods inherited from class org.jzy3d.plot3d.rendering.ordering.AbstractOrderingStrategy
comparison, getCamera, getTransform, getView, setAll, setCamera, setTransform, setView, sortMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
BarycentreOrderingStrategy
public BarycentreOrderingStrategy() -
BarycentreOrderingStrategy
-
-
Method Details
-
compare
Operation must be: symetric: compare(a,b)=-compare(b,a) transitive: ((compare(x, y)>0) invalid input: '&'invalid input: '&' (compare(y, z)>0)) implies compare(x, z)>0 true if all Drawables and the Camera don't change position! consistency?: compare(x, y)==0 implies that sgn(compare(x, z))==sgn(compare(y, z)) -
score
Description copied from class:AbstractOrderingStrategyReturns a score for ranking this drawable among other drawables of the scenegraph.- Specified by:
scorein classAbstractOrderingStrategy
-
score
- Specified by:
scorein classAbstractOrderingStrategy
-