Package org.jzy3d.plot3d.rendering.scene
Class MultithreadedGraph
- java.lang.Object
-
- org.jzy3d.plot3d.rendering.scene.Graph
-
- org.jzy3d.plot3d.rendering.scene.MultithreadedGraph
-
public class MultithreadedGraph extends Graph
WORK IN PROGRESS ================= Split drawing tasks to multiple thread, and wait for termination of all drawing tasks before exiting the draw method, hence ensuring a consistent display. This prove to be hardly managed by opengl backends (emulgl and jogl) that require GL primitives being called consistently in order (glBegin->glVertex->glEnd) : multi thread make them interlaced in the current GL context. EmulGL : throws exception JOGL : AWT and NEWT are both crashing the JVM- Author:
- martin
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jzy3d.plot3d.rendering.scene.Graph
Graph.GraphListener
-
-
Field Summary
-
Fields inherited from class org.jzy3d.plot3d.rendering.scene.Graph
components, graphListener, scene, sort, strategy, t, transform, VERBOSE
-
-
Constructor Summary
Constructors Constructor Description MultithreadedGraph(Scene scene, AbstractOrderingStrategy strategy, boolean sort)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
void
draw(IPainter painter)
Decompose allComposite
objects, and sort the extracted monotype (i.e.void
draw(IPainter painter, List<Drawable> components, boolean sort)
void
drawDecomposition(IPainter painter)
render all items of the graph after decomposing all composite item into primitive drawablesvoid
drawSimple(IPainter painter, List<Drawable> components)
render all items of the graphList<Drawable>
getDecomposition()
Expand allAbstractComposites
instance into a list of atomicDrawable
types and return all the current Graph primitives decomposition.-
Methods inherited from class org.jzy3d.plot3d.rendering.scene.Graph
add, add, add, add, addGraphListener, fireMountAll, getAll, getAllGLBindedResources, getBounds, getGraphListener, getLegends, getScene, getStrategy, getTransform, hasLegends, isSort, mountAllGLBindedResources, project, remove, remove, setSort, setStrategy, setTransform, toString
-
-
-
-
Constructor Detail
-
MultithreadedGraph
public MultithreadedGraph(Scene scene, AbstractOrderingStrategy strategy, boolean sort)
-
-
Method Detail
-
draw
public void draw(IPainter painter)
Decompose allComposite
objects, and sort the extracted monotype (i.e. non-Composite
Drawable
s) in order to render them according to the default -or defined-AbstractOrderingStrategy
.
-
drawSimple
public void drawSimple(IPainter painter, List<Drawable> components)
render all items of the graph- Overrides:
drawSimple
in classGraph
-
drawDecomposition
public void drawDecomposition(IPainter painter)
render all items of the graph after decomposing all composite item into primitive drawables- Overrides:
drawDecomposition
in classGraph
-
getDecomposition
public List<Drawable> getDecomposition()
Expand allAbstractComposites
instance into a list of atomicDrawable
types and return all the current Graph primitives decomposition.- Overrides:
getDecomposition
in classGraph
-
-