org.jzy3d.plot3d.rendering.ordering
Class BarycentreOrderingStrategy
- java.lang.Object
-
- org.jzy3d.plot3d.rendering.ordering.AbstractOrderingStrategy
-
- org.jzy3d.plot3d.rendering.ordering.BarycentreOrderingStrategy
-
- All Implemented Interfaces:
- java.util.Comparator<AbstractDrawable>
public class BarycentreOrderingStrategy extends AbstractOrderingStrategy
TheBarycentreOrderingStrategycompare twoAbstractDrawables by computing their respective distances to theCamera, which must be referenced prior to any comparison.
-
-
Constructor Summary
Constructors Constructor and Description BarycentreOrderingStrategy()BarycentreOrderingStrategy(View view)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intcompare(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! consistency?: compare(x, y)==0 implies that sgn(compare(x, z))==sgn(compare(y, z))doublescore(AbstractDrawable d)Returns a score for ranking this drawable among other drawables of the scenegraph.doublescore(Coord3d coord)-
Methods inherited from class org.jzy3d.plot3d.rendering.ordering.AbstractOrderingStrategy
getCamera, getGl, getGlu, getTransform, getView, setAll, setCamera, setGl, setGlu, setTransform, setView, sort
-
-
-
-
Constructor Detail
-
BarycentreOrderingStrategy
public BarycentreOrderingStrategy()
-
BarycentreOrderingStrategy
public BarycentreOrderingStrategy(View view)
-
-
Method Detail
-
compare
public 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! consistency?: compare(x, y)==0 implies that sgn(compare(x, z))==sgn(compare(y, z))
-
score
public double score(AbstractDrawable d)
Description copied from class:AbstractOrderingStrategyReturns a score for ranking this drawable among other drawables of the scenegraph.- Specified by:
scorein classAbstractOrderingStrategy
-
score
public double score(Coord3d coord)
- Specified by:
scorein classAbstractOrderingStrategy
-
-
DMelt 3.0 © DataMelt by jWork.ORG