|
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.DisplayCollection
public abstract class DisplayCollection
A marker interface that represents a class capable of managing a single set of layers and the pipeline(s) needed to render them.
The collection groups together a set of layers that are to appear on a surface and the pipelines needed to render them. The idea is to allow a single rendering manager manage one or more scenegraphs and all of the rendering infrastructure needed, yet keep all the updates synchronised. A typical example of this would a MDI application that has multiple windows each with their own set of layers and viewpoints onto a single shared scene graph. This differs from the single window with layers creating separate viewports that are constrained to that window.
Implementation Notes
This class contains a number of protected methods. These are called by the
RenderManager
implementation at different times in the rendering
cycle with appropriate information. These are methods that should not be
called by the normal user, so they have been made protected to allow
package-only access to them, yet remain seeable by implementors of this
class outside of this package.
Changing the layers and pipelines are subject to the same timing restrictions as the rest of the scene graph. Layers may only be changed during the dataChanged() callbacks.
Field Summary | |
---|---|
protected static java.lang.String |
ACTIVE_RENDERING_MSG
Message when trying to call any of the set or render methods while the class is currently processing the pipeline. |
protected DeletableRenderable[] |
deletionList
Queue for holding deleted textures |
protected boolean |
enabled
Current enabled state |
protected org.j3d.util.ErrorReporter |
errorReporter
Error reporter used to send out messages |
protected static java.lang.String |
LAYER_SET_SIZE_ERR
Message when the setLayers() call doesn't have an array big enough |
protected static java.lang.String |
LAYER_TIMING_MSG
Message when attempting to set layers at the wrong time |
protected int |
numDeletables
The number of items to delete this frame |
protected int |
numShaderInit
The number of shader init requestors |
protected int |
numShaderLog
The number of shader log requestors |
protected ShaderSourceRenderable[] |
shaderInitList
The shader renderables that need to be initialised |
protected ShaderSourceRenderable[] |
shaderLogList
The shader renderables that want log information |
protected boolean |
terminate
Flag that the runtime thread should be terminated at next chance |
protected boolean |
writeEnabled
Flag controlling layer change timing |
Constructor Summary | |
---|---|
protected |
DisplayCollection()
Initialise the basic structures of this collection. |
Method Summary | |
---|---|
abstract void |
addPipeline(RenderPipeline pipe)
Add a pipeline to be rendered to the manager. |
abstract boolean |
displayOnly()
Cause the surface to redraw the next frame only, with no processing of the pipeline. |
protected void |
enableLayerChange(boolean state)
Notification that the timing model permits changing the layers now. |
abstract void |
getLayers(Layer[] layers)
Fetch the current layers that are set. |
abstract void |
halt()
Force a halt of the current processing. |
boolean |
isDisposed()
Check to see if this pipeline is now inoperable. |
boolean |
isEnabled()
Get the current render state of the manager. |
abstract int |
numLayers()
Get the number of layers that are currently set. |
abstract boolean |
process()
Force a single render of all pipelines now contained in this collection now. |
protected void |
queueDeletedObjects(DeletableRenderable[] deleted,
int num)
Queue up a objects for deletion with the next rendering pass. |
protected void |
queueShaderObjects(ShaderSourceRenderable[] initList,
int numInit,
ShaderSourceRenderable[] logList,
int numLog)
Queue up shader objects that need some pre-processing done. |
abstract void |
removePipeline(RenderPipeline pipe)
Remove an already registered pipeline from the manager. |
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. |
abstract void |
setLayers(Layer[] layers,
int numLayers)
Set the set of layers for this manager. |
protected abstract void |
setUpdateHandler(NodeUpdateHandler handler)
Set the update handler that controls synchronisations of write/read process to the scene graph. |
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 |
Field Detail |
---|
protected static final java.lang.String LAYER_SET_SIZE_ERR
protected static final java.lang.String LAYER_TIMING_MSG
protected static final java.lang.String ACTIVE_RENDERING_MSG
protected ShaderSourceRenderable[] shaderInitList
protected ShaderSourceRenderable[] shaderLogList
protected DeletableRenderable[] deletionList
protected int numShaderInit
protected int numShaderLog
protected int numDeletables
protected boolean enabled
protected boolean terminate
protected org.j3d.util.ErrorReporter errorReporter
protected boolean writeEnabled
Constructor Detail |
---|
protected DisplayCollection()
Method Detail |
---|
public abstract boolean process()
In general, it is inadvisable that method be called by end users as it is normally managed by the RenderManager.
The return value indicates success or failure in the ability to render this frame. Typically it will indicate failure if the underlying surface has been disposed of, either directly through the calling of the method on this interface, or through an internal check mechanism. If failure is indicated, then check to see if the surface has been disposed of and discontinue rendering if it has.
public abstract boolean displayOnly()
The return value indicates success or failure in the ability to render this frame. Typically it will indicate failure if the underlying surface has been disposed of, either directly through the calling of the method on this interface, or through an internal check mechanism. If failure is indicated, then check to see if the surface has been disposed of and discontinue rendering if it has.
public abstract void halt()
public abstract 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.
If this render manager is currently running, this method can only be called during the main update
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 abstract int numLayers()
public abstract void getLayers(Layer[] layers)
numLayers()
in length. If not, this method does nothing (the
provided array will be unchanged).
layers
- An array to copy the values intopublic abstract void addPipeline(RenderPipeline pipe) throws java.lang.IllegalStateException
pipe
- The new pipe instance to be added
java.lang.IllegalStateException
- The system is currently management and
should be disabled first.public abstract void removePipeline(RenderPipeline pipe) throws java.lang.IllegalStateException
pipe
- The pipe instance to be removed
java.lang.IllegalStateException
- The system is currently management and
should be disabled first.protected abstract void setUpdateHandler(NodeUpdateHandler handler)
handler
- The new handler instance to useprotected void enableLayerChange(boolean state)
state
- true to enable layers to be changed, false to disableprotected void queueDeletedObjects(DeletableRenderable[] deleted, int num)
deleted
- The items to be processed for deletionnum
- The number of valid items in this arrayprotected void queueShaderObjects(ShaderSourceRenderable[] initList, int numInit, ShaderSourceRenderable[] logList, int numLog)
initList
- The items to be processed GLSL compilationnumInit
- The number of valid items in the init arraylogList
- The items requesting shader log infonumLog
- The number of valid items in the log arraypublic void setErrorReporter(org.j3d.util.ErrorReporter reporter)
reporter
- The instance to use or nullpublic void setEnabled(boolean state)
state
- True if to enable managementpublic boolean isEnabled()
public void shutdown()
RenderManager
and should not need to be called by
end users.
public boolean isDisposed()
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |