|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.pipeline.MultiThreadRenderManager
Implementation of the RenderPipelineManager
that uses separate
threads for each of the pipelines that it is managing, allowing it to run
multiple output surfaces simultaneously (eg Powerwall, CAVE etc).
By default the manager does not start of enabled. An explicit enable call will be needed to kick the rendering process off.
Change List processing will process bounds changed items before data changed.
Note:
Layers are not implemented yet.
Constructor Summary | |
MultiThreadRenderManager()
Construct a new render manager with no pipelines or renderers registered. |
|
MultiThreadRenderManager(int numPipes,
int numAudioPipes)
Construct a new render manager with no pipelines or renderers registered, but with internal arrays setup for the given number of pipelines to be added. |
Method Summary | |
void |
addAudioPipeline(AudioPipeline pipe)
Add a audio pipeline to be rendered to the manager. |
void |
addPipeline(RenderPipeline pipe)
Add a pipeline to be rendered to the manager. |
boolean |
boundsChanged(NodeUpdateListener l,
java.lang.Object src,
InternalNodeUpdateListener intL)
Notify the handler that you have updates to the SG that might alter a node's bounds. |
void |
dataChanged(NodeUpdateListener l,
java.lang.Object src)
Notify the handler that you have updates to the SG that will not alter a node's bounds. |
void |
disableInternalShutdown()
Disable the internal shutdown hook system. |
void |
frameFinished()
Notification that the frame state has finished rendering. |
void |
getLayers(Layer[] layers)
Fetch the current layers that are set. |
int |
getMinimumFrameInterval()
Fetch the currently set duty cycle value. |
PickingHandler |
getPickHandler()
Get the picking handler so that we can do some picking operations. |
Scene |
getScene()
Fetch the currently set scene. |
boolean |
isBoundsWritePermitted(java.lang.Object src)
Check to see if writing to the node is permitted currently. |
boolean |
isDataWritePermitted(java.lang.Object src)
Check to see if writing to the node is permitted currently. |
boolean |
isEnabled()
Get the current render state of the manager. |
boolean |
isPickingPermitted()
Check to see if picking is permitted currently. |
int |
numLayers()
Get the number of layers that are currently set. |
void |
objectRemoved(DeletableSceneGraphObject obj)
The object provided is no longer needed by its parent. |
void |
removeAudioPipeline(AudioPipeline pipe)
Remove an already registered pipeline from the manager. |
void |
removePipeline(RenderPipeline pipe)
Remove an already registered pipeline from the manager. |
void |
renderOnce()
Force a single render of all pipelines now. |
void |
requestFullSceneRender()
Request that the manager perform a full scene render pass and update, ignoring any usual optimisations that it may take. |
void |
run()
Run method used to synchronise the internal rendering state and the external state of the canvas. |
void |
setApplicationObserver(ApplicationUpdateObserver obs)
Register an observer that can be used to know when the application is safe to update the scene graph. |
void |
setEnabled(boolean state)
Tell render to start or stop rendering. |
void |
setLayers(Layer[] layers,
int numLayers)
Set the set of layers for this manager. |
void |
setMinimumFrameInterval(int cycleTime)
Set the minimum duty cycle of the render manager. |
void |
setScene(Scene scene)
Set the scene for this manager. |
void |
shaderRequiresInit(ShaderSceneGraphObject shader,
boolean updateResponse)
The shader object passed requires an initialisation be performed. |
void |
shaderRequiresLogInfo(ShaderSceneGraphObject shader,
boolean updateResponse)
The shader object passed requires updating the log info. |
void |
shutdown()
Notification to shutdown the internals of the renderer because the application is about to exit. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MultiThreadRenderManager()
public MultiThreadRenderManager(int numPipes, int numAudioPipes)
numPipes
- The initial number of pipelines to preparenumAudioPipes
- The initial number of audio pipelines to prepareMethod Detail |
public void setEnabled(boolean state)
setEnabled
in interface RenderPipelineManager
state
- True if to enable renderingpublic boolean isEnabled()
isEnabled
in interface RenderPipelineManager
public void renderOnce() throws java.lang.IllegalStateException
renderOnce
in interface RenderPipelineManager
java.lang.IllegalStateException
- The system is currently rendering and
should be disabled first.public void requestFullSceneRender()
This method will work both in automated rendering and with the
renderOnce()
method.
requestFullSceneRender
in interface RenderPipelineManager
public void setScene(Scene scene)
setScene
in interface RenderPipelineManager
scene
- The new scenepublic Scene getScene()
getScene
in interface RenderPipelineManager
public void setLayers(Layer[] layers, int numLayers)
null
will remove the currently set of layers. If this is
set while a current scene is set, then the scene will be cleared. Layers
are presented in depth order - layers[0] is rendered before layers[1]
etc.
setLayers
in interface RenderPipelineManager
layers
- The collection of layers, in order, to rendernumLayers
- The number of valid layers to usepublic int numLayers()
numLayers
in interface RenderPipelineManager
public void getLayers(Layer[] layers)
numLayers()
in length. If not, this method does nothing (the
provided array will be unchanged).
getLayers
in interface RenderPipelineManager
layers
- An array to copy the values intopublic void setMinimumFrameInterval(int cycleTime)
setMinimumFrameInterval
in interface RenderPipelineManager
cycleTime
- The minimum time in milliseconds between framespublic int getMinimumFrameInterval()
getMinimumFrameInterval
in interface RenderPipelineManager
public void addPipeline(RenderPipeline pipe) throws java.lang.IllegalStateException
addPipeline
in interface RenderPipelineManager
pipe
- The new pipe instance to be added
java.lang.IllegalStateException
- The system is currently rendering and
should be disabled first.public void addAudioPipeline(AudioPipeline pipe) throws java.lang.IllegalStateException
addAudioPipeline
in interface RenderPipelineManager
pipe
- The new pipe instance to be added
java.lang.IllegalStateException
- The system is currently rendering and
should be disabled first.public void removePipeline(RenderPipeline pipe) throws java.lang.IllegalStateException
removePipeline
in interface RenderPipelineManager
pipe
- The pipe instance to be removed
java.lang.IllegalStateException
- The system is currently rendering and
should be disabled first.public void removeAudioPipeline(AudioPipeline pipe) throws java.lang.IllegalStateException
removeAudioPipeline
in interface RenderPipelineManager
pipe
- The pipe instance to be removed
java.lang.IllegalStateException
- The system is currently rendering and
should be disabled first.public void setApplicationObserver(ApplicationUpdateObserver obs)
setApplicationObserver
in interface RenderPipelineManager
obs
- The observer instance to usepublic void disableInternalShutdown()
shutdown()
method is called to
turn off the OpenGL rendering system. If it does not, there is a good
possibility of a crash of the system.
If the internal shutdown is disabled, then the shutdown callback of the
ApplicationUpdateObserver
will not be called.
disableInternalShutdown
in interface RenderPipelineManager
public void shutdown()
shutdown
in interface RenderPipelineManager
public void run()
run
in interface java.lang.Runnable
public void frameFinished()
frameFinished
in interface org.j3d.aviatrix3d.pipeline.PipelineStateObserver
public boolean isDataWritePermitted(java.lang.Object src)
isDataWritePermitted
in interface NodeUpdateHandler
src
- The object that is requesting the check
public boolean isBoundsWritePermitted(java.lang.Object src)
isBoundsWritePermitted
in interface NodeUpdateHandler
src
- The object that is requesting the check
public boolean isPickingPermitted()
isPickingPermitted
in interface NodeUpdateHandler
public boolean boundsChanged(NodeUpdateListener l, java.lang.Object src, InternalNodeUpdateListener intL) throws InvalidListenerSetTimingException
boundsChanged
in interface NodeUpdateHandler
l
- The change requestorsrc
- The object that is passing this listener through.intL
- Internal listener for making callbacks at a later time
to propogate the bounds changes.
InvalidListenerSetTimingException
- If called when the node called
during one of the bounds/data changed callbackspublic void dataChanged(NodeUpdateListener l, java.lang.Object src) throws InvalidListenerSetTimingException
dataChanged
in interface NodeUpdateHandler
l
- The change requestorsrc
- The object that is passing this listener through.
InvalidListenerSetTimingException
- If called when the node called
during one of the bounds/data changed callbackspublic void shaderRequiresInit(ShaderSceneGraphObject shader, boolean updateResponse)
shaderRequiresInit
in interface NodeUpdateHandler
shader
- The shader instance to queueupdateResponse
- true if this is being made as a response to a node's
setUpdateHandler() methodpublic void shaderRequiresLogInfo(ShaderSceneGraphObject shader, boolean updateResponse)
shaderRequiresLogInfo
in interface NodeUpdateHandler
shader
- The shader instance to queueupdateResponse
- true if this is being made as a response to a node's
setUpdateHandler() methodpublic void objectRemoved(DeletableSceneGraphObject obj)
objectRemoved
in interface NodeUpdateHandler
obj
- The object that is registering itself for deletionpublic PickingHandler getPickHandler()
getPickHandler
in interface NodeUpdateHandler
|
Aviatrix3D 1.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |