|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.j3d.aviatrix3d.pipeline.SingleThreadRenderManager
Implementation of the RenderPipelineManager
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.
Note:
Layers are not implemented yet.
Constructor Summary | |
SingleThreadRenderManager()
Construct a new render manager with no pipelines or renderers registered. |
|
SingleThreadRenderManager(RenderPipeline pipe,
AudioPipeline audioPipe,
DrawableSurface surface,
AudioDevice device)
Constructs a new DefaultRenderManager for a single channel |
|
SingleThreadRenderManager(RenderPipeline pipe,
DrawableSurface surface)
Constructs a new DefaultRenderManager for a single channel |
Method Summary | |
void |
addAudioPipeline(AudioPipeline pipe)
Add an 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 |
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 |
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 |
setAudioDevice(AudioDevice device)
Set the Audio Device that is the output for this render manager. |
void |
setDrawableSurface(DrawableSurface surface)
Set the drawable surface that is the output for this render manager. |
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)
The shader object passed requires an initialisation be performed. |
void |
shaderRequiresLogInfo(ShaderSceneGraphObject shader)
The shader object passed requires updating the log info. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SingleThreadRenderManager()
public SingleThreadRenderManager(RenderPipeline pipe, DrawableSurface surface)
pipe
- The new pipe instance to be usedsurface
- The surface to draw topublic SingleThreadRenderManager(RenderPipeline pipe, AudioPipeline audioPipe, DrawableSurface surface, AudioDevice device)
pipe
- The new pipe instance to be usedsurface
- The surface to draw todevice
- The audio device to render toMethod 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 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 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 boolean boundsChanged(NodeUpdateListener l, java.lang.Object src, InternalNodeUpdateListener intL)
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.
public void dataChanged(NodeUpdateListener l, java.lang.Object src)
dataChanged
in interface NodeUpdateHandler
l
- The change requestorsrc
- The object that is passing this listener through.public void objectRemoved(DeletableSceneGraphObject obj)
objectRemoved
in interface NodeUpdateHandler
obj
- The object that is registering itself for deletionpublic PickingHandler getPickHandler()
getPickHandler
in interface NodeUpdateHandler
public void shaderRequiresInit(ShaderSceneGraphObject shader)
shaderRequiresInit
in interface NodeUpdateHandler
shader
- The shader instance to queuepublic void shaderRequiresLogInfo(ShaderSceneGraphObject shader)
shaderRequiresLogInfo
in interface NodeUpdateHandler
shader
- The shader instance to queuepublic void setDrawableSurface(DrawableSurface surface)
surface
- The surface to usepublic void setAudioDevice(AudioDevice device)
device
- The device to use
|
j3d.org Aviatrix3D | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |