Package org.jzy3d.plot3d.rendering.scene
Class Scene
- java.lang.Object
-
- org.jzy3d.plot3d.rendering.scene.Scene
-
- Direct Known Subclasses:
ChartScene
public class Scene extends Object
A Scene holds aGraphto be rendered by a listViews. The creation of Views is not of user concern, since it is handled during the registration of the Scene by aICanvas. The newView() is thus protected because it is supposed to be called by a Canvas3d or a View only. The Scene is called by theRenderer3dto provide the effective (protected) GL2 calls for initialization (List and Texture loading), clearing of window, and current view rendering.- Author:
- Martin Pernollet
-
-
Constructor Summary
Constructors Constructor Description Scene(boolean graphsort, IChartFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(List<Drawable> drawables)Add a list of drawable to the scene.voidadd(Drawable drawable)Add a drawable to the scene.voidadd(Drawable drawable, boolean updateViews)Add a drawable to the scene and refresh on demand.voidadd(Light drawable)Add a light to the scene.voidclearView(View view)voiddispose()Handles disposing of the Graph as well as all views pointing to this Graph.GraphgetGraph()Get the scene graph attached to this scene.LightSetgetLightSet()Get the light set attached to this scene.ViewnewView(ICanvas canvas, Quality quality)Instantiate a View attached to the given Canvas, and return its reference.voidremove(Drawable drawable)Remove a drawable from the scene.voidremove(Drawable drawable, boolean updateViews)Remove a drawable from the scene and refresh on demand.voidremove(Light drawable)Remove a drawable from the scene.voidsetGraph(Graph graph)Attach a scene graph to this scene.voidsetLightSet(LightSet lightSet)Attach a light set to this scene.StringtoString()Return the sceneGraphstring representation.
-
-
-
Field Detail
-
graph
protected Graph graph
-
lightSet
protected LightSet lightSet
-
factory
protected IChartFactory factory
-
-
Constructor Detail
-
Scene
public Scene(boolean graphsort, IChartFactory factory)
-
-
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(Drawable drawable)
Add a drawable to the scene.
-
add
public void add(Drawable drawable, boolean updateViews)
Add a drawable to the scene and refresh on demand.
-
remove
public void remove(Drawable drawable, boolean updateViews)
Remove a drawable from the scene and refresh on demand.
-
remove
public void remove(Drawable 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)
-
-