public class Scene extends Object
Graph
to be rendered by a list
View
s.
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) GL2 calls for initialization (List and Texture loading),
clearing of window, and current view rendering.Modifier and Type | Field and Description |
---|---|
protected IChartComponentFactory |
factory |
protected Graph |
graph |
protected LightSet |
lightSet |
protected Vector<View> |
views |
Constructor and Description |
---|
Scene() |
Scene(boolean graphsort) |
Scene(boolean graphsort,
IChartComponentFactory factory) |
Modifier and Type | Method and Description |
---|---|
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(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.
|
String |
toString()
Return the scene
Graph string representation. |
protected Graph graph
protected LightSet lightSet
protected IChartComponentFactory factory
public Scene()
public Scene(boolean graphsort)
public Scene(boolean graphsort, IChartComponentFactory factory)
public void dispose()
public void setGraph(Graph graph)
public Graph getGraph()
public void setLightSet(LightSet lightSet)
public LightSet getLightSet()
public void add(List<AbstractDrawable> drawables)
public void add(AbstractDrawable drawable)
public void add(AbstractDrawable drawable, boolean updateViews)
public void remove(AbstractDrawable drawable, boolean updateViews)
public void remove(AbstractDrawable drawable)
public void add(Light drawable)
public void remove(Light drawable)
public View newView(ICanvas canvas, Quality quality)
public void clearView(View view)
Copyright © 2016. All rights reserved.