|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.management.MultiThreadRenderManager
public class MultiThreadRenderManager
Implementation of the RenderManager
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 management process off.
Change List processing will process bounds changed items before data changed.
Constructor Summary | |
---|---|
MultiThreadRenderManager()
Construct a new render manager with no pipelines or renderers registered. |
|
MultiThreadRenderManager(int numDisplays)
Construct a new render manager with no pipelines or renderers registered, but with internal arrays setup for the given number of displays to be added. |
Method Summary | |
---|---|
void |
activeSoundLayerChanged(InternalLayerUpdateListener intL)
Notify the handler that you are now going to be the active layer for sound rendering. |
void |
addDisplay(DisplayCollection collection)
Add a dislay collection to be managed. |
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 management. |
int |
getMinimumFrameInterval()
Fetch the currently set duty cycle value. |
PickingManager |
getPickingManager()
Get the picking handler so that we can do some picking operations. |
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 |
isHaltingOnError()
Check to see the current halt on error state. |
boolean |
isPickingPermitted()
Check to see if picking is permitted currently. |
void |
notifyUpdateRequired()
Feedback to the internals that a data object has changed and it requires re-management. |
void |
removeDisplay(DisplayCollection collection)
Remove an already registered display collection from the manager. |
void |
renderOnce()
Force a single render of all pipelines now. |
void |
requestDeletion(DeletableRenderable deletable)
Notification that the passed in renderable is wishing to mark itself ready for deletion processing. |
void |
requestFullSceneRender()
Request that the manager perform a full scene render pass and update, ignoring any usual optimisations that it may take. |
void |
rescindDeletionRequest(DeletableRenderable deletable)
Woops, we were in error, so please rescind that deletion request. |
void |
run()
Run method used to synchronise the internal management 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 management. |
void |
setErrorReporter(org.j3d.util.ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the node's internals can be reported in a nice, pretty fashion. |
void |
setHaltOnError(boolean state)
Set whether the manager should automatically halt management if an error or exception is detected during the user callback processing. |
void |
setMinimumFrameInterval(int cycleTime)
Set the minimum duty cycle of the render manager. |
void |
setPickingManager(PickingManager mgr)
Set the picking handler to use. |
void |
shaderRequiresInit(ShaderSourceRenderable shader,
boolean updateResponse)
The shader object passed requires an initialisation be performed. |
void |
shaderRequiresLogInfo(ShaderSourceRenderable 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 numDisplays)
numDisplays
- The initial number of displays to prepareMethod Detail |
---|
public void setErrorReporter(org.j3d.util.ErrorReporter reporter)
setErrorReporter
in interface RenderManager
reporter
- The instance to use or nullpublic void setHaltOnError(boolean state)
If the value is set to false, then the error is caught, but management continues on regardless.
In both states, the error that is caught is reported through the
currently registered ErrorReporter
instance as an error message.
setHaltOnError
in interface RenderManager
state
- true to enable halting, false to disablepublic boolean isHaltingOnError()
isHaltingOnError
in interface RenderManager
setHaltOnError(boolean)
public void setEnabled(boolean state)
setEnabled
in interface RenderManager
state
- True if to enable managementpublic boolean isEnabled()
isEnabled
in interface RenderManager
public void renderOnce() throws java.lang.IllegalStateException
renderOnce
in interface RenderManager
java.lang.IllegalStateException
- The system is currently management and
should be disabled first.public void requestFullSceneRender()
This method will work both in automated management and with the
renderOnce()
method.
requestFullSceneRender
in interface RenderManager
public void setMinimumFrameInterval(int cycleTime)
setMinimumFrameInterval
in interface RenderManager
cycleTime
- The minimum time in milliseconds between framespublic int getMinimumFrameInterval()
getMinimumFrameInterval
in interface RenderManager
public void addDisplay(DisplayCollection collection) throws java.lang.IllegalStateException
addDisplay
in interface RenderManager
collection
- The new collection instance to be added
java.lang.IllegalStateException
- The system is currently management and
should be disabled first.public void removeDisplay(DisplayCollection collection) throws java.lang.IllegalStateException
removeDisplay
in interface RenderManager
collection
- The collection instance to be removed
java.lang.IllegalStateException
- The system is currently management and
should be disabled first.public void setPickingManager(PickingManager mgr) throws java.lang.IllegalStateException
setPickingManager
in interface RenderManager
mgr
- The new pick manager instance to use, or null
java.lang.IllegalStateException
- The system is currently management and
should be disabled first.public void setApplicationObserver(ApplicationUpdateObserver obs)
setApplicationObserver
in interface RenderManager
obs
- The observer instance to usepublic void disableInternalShutdown()
shutdown()
method is called to
turn off the OpenGL management 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 RenderManager
public void shutdown()
shutdown
in interface RenderManager
public void run()
run
in interface java.lang.Runnable
public void frameFinished()
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 void notifyUpdateRequired()
ViewEnvironment
changing the aspect ratio etc.
notifyUpdateRequired
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 activeSoundLayerChanged(InternalLayerUpdateListener intL) throws InvalidListenerSetTimingException
activeSoundLayerChanged
in interface NodeUpdateHandler
intL
- Internal listener for making callbacks at a later time
to propogate when the target is no longer the active listener.
InvalidListenerSetTimingException
public void shaderRequiresInit(ShaderSourceRenderable 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(ShaderSourceRenderable 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 requestDeletion(DeletableRenderable deletable)
This renderable instance will begin the deletion processing as soon as the start of the next culling pass begins. Once it hits the output device, deletion requests are guaranteed to be the first item that is processed, before all other requests.
If the object is already in the queue, the request will be silently ignored.
requestDeletion
in interface NodeUpdateHandler
deletable
- The renderable that will handle the cleanup at
the appropriate timepublic void rescindDeletionRequest(DeletableRenderable deletable)
You can only rescind request that has happened in this frame as the delete requests are packaged up and sent off down the pipeline each frame, then forgotten about during the rendering process.
Rescinding a request for an object no-longer in the queue (eg multiple request, or just was never added in the first place), will be silently ignored.
rescindDeletionRequest
in interface NodeUpdateHandler
deletable
- The renderable that should be removed from the queue.public PickingManager getPickingManager()
getPickingManager
in interface RenderManager
getPickingManager
in interface NodeUpdateHandler
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |