org.jzy3d.plot3d.rendering.scene
Class Scene

java.lang.Object
  extended by org.jzy3d.plot3d.rendering.scene.Scene
Direct Known Subclasses:
ChartScene

public class Scene
extends java.lang.Object

A Scene holds a Graph to be rendered by a list Views. The creation of Views is not of user concern, since it is handled during the registration of the Scene by a ICanvas. The newView() is thus protected because it is supposed to be called by a Canvas3d or a View only. The Scene is called by the Renderer3d to provide the effective (protected) GL calls for initialization (List and Texture loading), clearing of window, and current view rendering.

Author:
Martin Pernollet

Constructor Summary
Scene()
           
Scene(boolean graphsort)
           
Scene(Graph graph)
           
 
Method Summary
 void add(AbstractDrawable drawable)
          Add a drawable to the scene.
 void add(AbstractDrawable drawable, boolean updateViews)
          Add a drawable to the scene and refresh on demand.
 void add(Light drawable)
          Add a light to the scene.
 void add(java.util.List<AbstractDrawable> drawables)
          Add a list of drawable to the scene.
 void clearView(View view)
           
 void dispose()
          Handles disposing of the Graph as well as all views pointing to this Graph.
 Graph getGraph()
          Get the scene graph attached to this scene.
 LightSet getLightSet()
          Get the light set attached to this scene.
 View newView(ICanvas canvas, Quality quality)
          Instantiate a View attached to the given Canvas, and return its reference.
 void remove(AbstractDrawable drawable)
          Remove a drawable from the scene.
 void remove(AbstractDrawable drawable, boolean updateViews)
          Remove a drawable from the scene and refresh on demand.
 void remove(Light drawable)
          Remove a drawable from the scene.
 void setGraph(Graph graph)
          Attach a scene graph to this scene.
 void setLightSet(LightSet lightSet)
          Attach a light set to this scene.
 java.lang.String toString()
          Return the scene Graph string representation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Scene

public Scene()

Scene

public Scene(boolean graphsort)

Scene

public Scene(Graph graph)
Method Detail

dispose

public void dispose()
Handles disposing of the Graph as well as all views pointing to this Graph.


setGraph

public void setGraph(Graph graph)
Attach a scene graph to this scene.


getGraph

public Graph getGraph()
Get the scene graph attached to this scene.


setLightSet

public void setLightSet(LightSet lightSet)
Attach a light set to this scene.


getLightSet

public LightSet getLightSet()
Get the light set attached to this scene.


add

public void add(java.util.List<AbstractDrawable> drawables)
Add a list of drawable to the scene.


add

public void add(AbstractDrawable drawable)
Add a drawable to the scene.


add

public void add(AbstractDrawable drawable,
                boolean updateViews)
Add a drawable to the scene and refresh on demand.


remove

public void remove(AbstractDrawable drawable,
                   boolean updateViews)
Remove a drawable from the scene and refresh on demand.


remove

public void remove(AbstractDrawable drawable)
Remove a drawable from the scene.


add

public void add(Light drawable)
Add a light to the scene.


remove

public void remove(Light drawable)
Remove a drawable from the scene.


newView

public View newView(ICanvas canvas,
                    Quality quality)
Instantiate a View attached to the given Canvas, and return its reference.


clearView

public void clearView(View view)

toString

public java.lang.String toString()
Return the scene Graph string representation.

Overrides:
toString in class java.lang.Object