org.jzy3d.plot3d.rendering.ordering
Class AbstractOrderingStrategy

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

public abstract class AbstractOrderingStrategy
extends Object
implements Comparator<AbstractDrawable>

An ordering strategy is a Comparator for AbstractDrawables that may compute the priority between AbstractDrawables d1 and d2.

Author:
Martin Pernollet

Field Summary
protected  Camera camera
           
protected  javax.media.opengl.GL gl
           
protected  javax.media.opengl.glu.GLU glu
           
protected  Transform transform
           
protected  View view
           
 
Constructor Summary
AbstractOrderingStrategy()
           
 
Method Summary
protected  int comparison(double dist1, double dist2)
          Return the opposite of closest distance, so that closest distance is sorted after farest distance.
 Camera getCamera()
           
 javax.media.opengl.GL getGl()
           
 javax.media.opengl.glu.GLU getGlu()
           
 Transform getTransform()
           
 View getView()
           
abstract  double score(AbstractDrawable drawable)
          Returns a score for ranking this drawable among other drawables of the scenegraph.
abstract  double score(Coord3d coord)
           
 void setAll(javax.media.opengl.GL gl, javax.media.opengl.glu.GLU glu, Camera camera, Transform transform)
           
 void setCamera(Camera camera)
           
 void setGl(javax.media.opengl.GL gl)
           
 void setGlu(javax.media.opengl.glu.GLU glu)
           
 void setTransform(Transform transform)
           
 void setView(View view)
           
 void sort(List<AbstractDrawable> monotypes, Camera cam)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Field Detail

view

protected View view

camera

protected Camera camera

transform

protected Transform transform

gl

protected javax.media.opengl.GL gl

glu

protected javax.media.opengl.glu.GLU glu
Constructor Detail

AbstractOrderingStrategy

public AbstractOrderingStrategy()
Method Detail

score

public abstract double score(AbstractDrawable 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<AbstractDrawable> monotypes,
                 Camera 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(javax.media.opengl.GL gl,
                   javax.media.opengl.glu.GLU glu,
                   Camera camera,
                   Transform transform)

getCamera

public Camera getCamera()

setCamera

public void setCamera(Camera camera)

getTransform

public Transform getTransform()

setTransform

public void setTransform(Transform transform)

getGl

public javax.media.opengl.GL getGl()

setGl

public void setGl(javax.media.opengl.GL gl)

getGlu

public javax.media.opengl.glu.GLU getGlu()

setGlu

public void setGlu(javax.media.opengl.glu.GLU glu)

getView

public View getView()

setView

public void setView(View view)


Copyright © 2013. All rights reserved.