|
||||||||||
| 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 allows decomposing the list of object
into a list of AbstractDrawables primitive (i.e. objects that are not
AbstractComposite.
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.
| 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 SceneGraph and call all views' so that they update their bounds according to their mode (automatic or manual). |
void |
add(java.util.List<? extends AbstractDrawable> drawables)
|
void |
add(java.util.List<? extends AbstractDrawable> drawables,
boolean updateViews)
|
void |
dispose()
|
void |
draw(javax.media.opengl.GL 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. |
java.util.List<AbstractDrawable> |
getAll()
|
BoundingBox3d |
getBounds()
Creates and return a BoundingBox3d that embed all Drawable bounds, among those that have a defined bounding box. |
java.util.List<Legend> |
getMetaData()
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 |
hasMetaData()
Return true if the Graph contains at least one AbstractDrawable that
has Legend that must be displayed. |
void |
init(javax.media.opengl.GL gl)
Initialize all objects of the scene graph that require an initialization. |
void |
project(javax.media.opengl.GL 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 |
select(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu,
int x,
int y)
|
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. |
java.lang.String |
toString()
Print out information concerning all Drawable of this composite. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 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(java.util.List<? extends AbstractDrawable> drawables,
boolean updateViews)
public void add(java.util.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 java.util.List<AbstractDrawable> getAll()
public void init(javax.media.opengl.GL gl)
public void draw(javax.media.opengl.GL 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.
public void select(javax.media.opengl.GL gl,
javax.media.opengl.glu.GLU glu,
int x,
int y)
public void project(javax.media.opengl.GL 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 java.util.List<Legend> getMetaData()
AbstractDrawable's Legend.
public int hasMetaData()
Graph contains at least one AbstractDrawable that
has Legend that must be displayed.
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||