|
Aviatrix3D 2.0 Dev |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.rendering.SingleThreadRenderManager
Implementation of the RenderManager
that uses a single thread
for all of the processing steps.
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.
Constructor Summary | |
SingleThreadRenderManager()
Construct a new render manager with no graphicsPipelines or renderers registered. |
|
SingleThreadRenderManager(GraphicsRenderPipeline graphicsPipe,
AudioRenderPipeline audioPipe,
GraphicsOutputDevice graphicsDev,
AudioOutputDevice audioDev)
Constructs a new DefaultRenderManager for a single channel |
|
SingleThreadRenderManager(GraphicsRenderPipeline graphicsPipe,
GraphicsOutputDevice graphicsDev)
Constructs a new DefaultRenderManager for a single channel |
Method Summary | |
void |
addPipeline(RenderPipeline pipe)
Add a graphicsPipeline 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 |
getLayers(Layer[] layers)
Fetch the current layers that are set. |
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-rendering. |
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 |
removePipeline(RenderPipeline pipe)
Remove an already registered graphicsPipeline from the manager. |
void |
renderOnce()
Force a single render of all graphicsPipelines 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 |
setAudioOutputDevice(AudioOutputDevice device)
Set the Audio Device that is the output for this render manager. |
void |
setEnabled(boolean state)
Tell render to start or stop rendering. |
void |
setErrorReporter(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 |
setGraphicsOutputDevice(GraphicsOutputDevice surface)
Set the graphicsDevice surface that is the output for this render manager. |
void |
setHaltOnError(boolean state)
Set whether the manager should automatically halt rendering if an error or exception is detected during the user callback processing. |
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 |
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 SingleThreadRenderManager()
public SingleThreadRenderManager(GraphicsRenderPipeline graphicsPipe, GraphicsOutputDevice graphicsDev)
graphicsPipe
- The graphics pipeline instance to be usedgraphicsDev
- The surface to draw topublic SingleThreadRenderManager(GraphicsRenderPipeline graphicsPipe, AudioRenderPipeline audioPipe, GraphicsOutputDevice graphicsDev, AudioOutputDevice audioDev)
graphicsPipe
- The graphics pipeline instance to be usedgraphicsDev
- The surface to draw toaudioPipe
- The graphics pipeline instance to be usedaudioDev
- The audio device to render toMethod Detail |
public void setErrorReporter(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 rendering 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
#haltOnError
public void setEnabled(boolean state)
setEnabled
in interface RenderManager
state
- True if to enable renderingpublic boolean isEnabled()
isEnabled
in interface RenderManager
public void renderOnce() throws java.lang.IllegalStateException
renderOnce
in interface RenderManager
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 RenderManager
public void setLayers(Layer[] layers, int numLayers) throws java.lang.IllegalArgumentException, InvalidWriteTimingException
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 RenderManager
layers
- The collection of layers, in order, to rendernumLayers
- The number of valid layers to use
java.lang.IllegalArgumentException
- The length of the layers array is less
than numLayers
InvalidWriteTimingException
- The method was called with the
system enabled and not during the app observer callbackpublic int numLayers()
numLayers
in interface RenderManager
public void getLayers(Layer[] layers)
numLayers()
in length. If not, this method does nothing (the
provided array will be unchanged).
getLayers
in interface RenderManager
layers
- An array to copy the values intopublic void setMinimumFrameInterval(int cycleTime)
setMinimumFrameInterval
in interface RenderManager
cycleTime
- The minimum time in milliseconds between framespublic int getMinimumFrameInterval()
getMinimumFrameInterval
in interface RenderManager
public void addPipeline(RenderPipeline pipe) throws java.lang.IllegalStateException
addPipeline
in interface RenderManager
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 RenderManager
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 RenderManager
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 RenderManager
public void shutdown()
shutdown
in interface RenderManager
public void run()
run
in interface java.lang.Runnable
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 objectRemoved(DeletableSceneGraphObject obj)
objectRemoved
in interface NodeUpdateHandler
obj
- The object that is registering itself for deletionpublic PickingManager getPickingManager()
getPickingManager
in interface NodeUpdateHandler
public 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 setGraphicsOutputDevice(GraphicsOutputDevice surface)
surface
- The surface to usepublic void setAudioOutputDevice(AudioOutputDevice device)
device
- The device to use
|
Aviatrix3D 2.0 Dev |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |