Class AbstractOrderingStrategy

java.lang.Object
org.jzy3d.plot3d.rendering.ordering.AbstractOrderingStrategy
All Implemented Interfaces:
Comparator<Drawable>
Direct Known Subclasses:
BarycentreOrderingStrategy, DefaultOrderingStrategy

public abstract class AbstractOrderingStrategy extends Object implements Comparator<Drawable>
An ordering strategy is a Comparator for Drawables that may compute the priority between Drawables d1 and d2.
Author:
Martin Pernollet
  • Field Details

    • view

      protected View view
    • camera

      protected Camera camera
    • transform

      protected Transform transform
  • Constructor Details

    • AbstractOrderingStrategy

      public AbstractOrderingStrategy()
  • Method Details

    • score

      public abstract double score(Drawable drawable)
      Returns a score for ranking this drawable among other drawables of the scenegraph.
    • score

      public abstract double score(Coord3d coord)
    • sort

      public void sort(List<Drawable> monotypes, Camera cam)
      Parameters:
      monotypes -
      cam -
    • comparison

      protected int comparison(double dist1, double dist2)
      Return the opposite of closest distance, so that closest distance is sorted after farest distance.
    • setAll

      public void setAll(Camera camera, Transform transform)
    • getCamera

      public Camera getCamera()
    • setCamera

      public void setCamera(Camera camera)
    • getTransform

      public Transform getTransform()
    • setTransform

      public void setTransform(Transform transform)
    • getView

      public View getView()
    • setView

      public void setView(View view)