Class BarycentreOrderingStrategy

java.lang.Object
org.jzy3d.plot3d.rendering.ordering.AbstractOrderingStrategy
org.jzy3d.plot3d.rendering.ordering.BarycentreOrderingStrategy
All Implemented Interfaces:
Comparator<Drawable>

public class BarycentreOrderingStrategy extends AbstractOrderingStrategy
The BarycentreOrderingStrategy compare two Drawables by computing their respective distances to the Camera, which must be referenced prior to any comparison.
Author:
Martin Pernollet
  • Constructor Details

    • BarycentreOrderingStrategy

      public BarycentreOrderingStrategy()
    • BarycentreOrderingStrategy

      public BarycentreOrderingStrategy(View view)
  • Method Details

    • compare

      public int compare(Drawable d1, Drawable d2)
      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

      public double score(Drawable d)
      Description copied from class: AbstractOrderingStrategy
      Returns a score for ranking this drawable among other drawables of the scenegraph.
      Specified by:
      score in class AbstractOrderingStrategy
    • score

      public double score(Coord3d coord)
      Specified by:
      score in class AbstractOrderingStrategy