|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jzy3d.plot3d.rendering.scene.Graph
public class Graph
The scene's Graph basically stores the scene content and facilitate objects control
The graph may decompose all AbstractComposite into a list of their AbstractDrawables primitives
if constructor is called with parameters enabling sorting.
The list of primitives is ordered using either the provided DefaultOrderingStrategy
or an other specified AbstractOrderingStrategy. Sorting is usefull for handling transparency
properly.
The Graph maintains a reference to its mother Scene in order to
inform the Views when its content has change and that repainting is required.
The add() method allows adding a AbstractDrawable to the scene Graph and updates
all views' viewpoint in order to target the center of the scene.
| Field Summary | |
|---|---|
protected List<AbstractDrawable> |
components
|
protected Scene |
scene
|
protected boolean |
sort
|
protected AbstractOrderingStrategy |
strategy
|
protected Transform |
transform
|
protected boolean |
VERBOSE
|
| Constructor Summary | |
|---|---|
Graph(Scene scene)
|
|
Graph(Scene scene,
AbstractOrderingStrategy strategy)
|
|
Graph(Scene scene,
AbstractOrderingStrategy strategy,
boolean sort)
|
|
Graph(Scene scene,
boolean sort)
|
|
| Method Summary | |
|---|---|
void |
add(AbstractDrawable drawable)
|
void |
add(AbstractDrawable drawable,
boolean updateViews)
Add a Drawable to the graph and call all views' so that they update their bounds according to their mode (automatic or manual). |
void |
add(List<? extends AbstractDrawable> drawables)
|
void |
add(List<? extends AbstractDrawable> drawables,
boolean updateViews)
|
void |
dispose()
|
void |
draw(javax.media.opengl.GL2 gl,
javax.media.opengl.glu.GLU glu,
Camera camera)
Decompose all AbstractComposite objects, and sort the extracted monotype
(i.e. non-AbstractComposite AbstractDrawables) in order to render them according
to the default -or defined- AbstractOrderingStrategy. |
protected void |
draw(javax.media.opengl.GL2 gl,
javax.media.opengl.glu.GLU glu,
Camera camera,
List<AbstractDrawable> components,
boolean sort)
|
List<AbstractDrawable> |
getAll()
|
List<IGLBindedResource> |
getAllGLBindedResources()
|
BoundingBox3d |
getBounds()
Creates and return a BoundingBox3d that embed all Drawable bounds, among those that have a defined bounding box. |
List<Legend> |
getLegends()
Return the list of available AbstractDrawable's Legend. |
AbstractOrderingStrategy |
getStrategy()
Get the @Drawable ordering strategy. |
Transform |
getTransform()
Return the transform that was affected to this composite. |
int |
hasLegends()
Return true if the Graph contains at least one AbstractDrawable that
has Legend that must be displayed. |
void |
mountAllGLBindedResources(javax.media.opengl.GL2 gl)
|
void |
project(javax.media.opengl.GL2 gl,
javax.media.opengl.glu.GLU glu,
Camera camera)
Update all interactive AbstractDrawable projections |
boolean |
remove(AbstractDrawable drawable)
|
boolean |
remove(AbstractDrawable drawable,
boolean updateViews)
Delete a Drawable from the SceneGraph and update all views' viewpoint in order to target the center of the scene. |
void |
setStrategy(AbstractOrderingStrategy strategy)
Set the @Drawable ordering strategy. |
void |
setTransform(Transform transform)
Delegate transforming iteratively to all Drawable of this graph and stores the given transform for keeping the ability of retrieving it. |
String |
toString()
Print out information concerning all Drawable of this composite. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected List<AbstractDrawable> components
protected Scene scene
protected Transform transform
protected boolean VERBOSE
protected AbstractOrderingStrategy strategy
protected boolean sort
| Constructor Detail |
|---|
public Graph(Scene scene)
public Graph(Scene scene,
boolean sort)
public Graph(Scene scene,
AbstractOrderingStrategy strategy)
public Graph(Scene scene,
AbstractOrderingStrategy strategy,
boolean sort)
| Method Detail |
|---|
public void dispose()
public void add(AbstractDrawable drawable,
boolean updateViews)
drawable: - The drawable that must be added to the scene graph.update: - should be true if you wish to have all the views updated with old bounds including drawable boundspublic void add(AbstractDrawable drawable)
public void add(List<? extends AbstractDrawable> drawables,
boolean updateViews)
public void add(List<? extends AbstractDrawable> drawables)
public boolean remove(AbstractDrawable drawable,
boolean updateViews)
drawable - The drawable that must be deleted from the scene graph.public boolean remove(AbstractDrawable drawable)
public List<AbstractDrawable> getAll()
public List<IGLBindedResource> getAllGLBindedResources()
public void mountAllGLBindedResources(javax.media.opengl.GL2 gl)
public void draw(javax.media.opengl.GL2 gl,
javax.media.opengl.glu.GLU glu,
Camera camera)
AbstractComposite objects, and sort the extracted monotype
(i.e. non-AbstractComposite AbstractDrawables) in order to render them according
to the default -or defined- AbstractOrderingStrategy.
protected void draw(javax.media.opengl.GL2 gl,
javax.media.opengl.glu.GLU glu,
Camera camera,
List<AbstractDrawable> components,
boolean sort)
public void project(javax.media.opengl.GL2 gl,
javax.media.opengl.glu.GLU glu,
Camera camera)
AbstractDrawable projections
public AbstractOrderingStrategy getStrategy()
@Drawable ordering strategy.
public void setStrategy(AbstractOrderingStrategy strategy)
@Drawable ordering strategy.
public void setTransform(Transform transform)
public Transform getTransform()
public BoundingBox3d getBounds()
public List<Legend> getLegends()
AbstractDrawable's Legend.
public int hasLegends()
Graph contains at least one AbstractDrawable that
has Legend that must be displayed.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||