Package org.web3d.vrml.nodes
Interface FrameStateManager
- All Known Implementing Classes:
DefaultFrameStateManager
public interface FrameStateManager
A representation of a manager that handles the current frame state and the listeners that wish to know about it.
- Version:
- $Revision: 1.11 $
- Author:
- Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a listener that is interested in knowing when the end of this frame is reached.void
clear()
Force clearing all state from this manager now.void
Clear all registered added nodes nowvoid
Clear all registered added scenes nowvoid
Clear all registered removed nodes nowvoid
Clear all registered removed scenes nowvoid
Notification that the current frame is finished.Get the added bindable nodes from this last frame.Get the added extern proto instances.Get the added externally synchronised nodes from this last frame.getAddedNodes
(int type) Get all the added nodes of the named type.org.j3d.util.ObjectArray
Get the scenes that have inserted during this last frame.Get the added scripts from this last frame.Get the added Sensors.Get the added terrain sources from this last frame.Get the added nodes with URL fields that will need to have their content loaded for the first time.Get the list of nodes that require view-dependent updates.Get all the removed bindable nodes.Get the removed externally synchronised nodes from this last frame.getRemovedNodes
(int type) Get all the removed nodes of the named type.org.j3d.util.ObjectArray
Get the scenes that have removed or replaced during this last frame.Get all the removed script nodes.Get the removed sensors.Get the removed nodes from this last frame of this specified type.Get the list of nodes that require view-dependent updates.void
listenFor
(int[] types) Instruct the state manager that you're interested in keeping track of nodes that have been added or removed of the given list of types.void
Register an externproto declaration as having been loaded this frame.void
registerAddedNode
(VRMLNode node) Register a node that has been added this frame.void
registerAddedNodes
(VRMLNode[] nodes) Register nodes that have been added this frame.void
Register an execution space that has been added in this frame.void
registerRemovedNode
(VRMLNode node) Register a node that has been removed this frame.void
registerRemovedNodes
(VRMLNode[] nodes) Register nodes that have been removed this frame.void
Register an execution space that has been removed in this frame.void
removeListenFor
(int[] types) Remove a type or types(s) that were previously registered as something to listen for.void
setErrorReporter
(org.j3d.util.ErrorReporter reporter) Register an error reporter with the manager so that any errors generated by the loading of script code can be reported in a nice, pretty fashion.
-
Method Details
-
setErrorReporter
void setErrorReporter(org.j3d.util.ErrorReporter reporter) Register an error reporter with the manager so that any errors generated by the loading of script code can be reported in a nice, pretty fashion. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.- Parameters:
reporter
- The instance to use or null
-
listenFor
void listenFor(int[] types) Instruct the state manager that you're interested in keeping track of nodes that have been added or removed of the given list of types. These are the primary node types.- Parameters:
types
- An array of types to listen for
-
removeListenFor
void removeListenFor(int[] types) Remove a type or types(s) that were previously registered as something to listen for. If one or more of the values were not previously registered we ignore that value.- Parameters:
types
- An array of types to remove
-
clear
void clear()Force clearing all state from this manager now. This is used to indicate that a new world is about to be loaded and everything should be cleaned out now. This does not clear the listened-for types list. -
frameFinished
void frameFinished()Notification that the current frame is finished. This should never be called by user code (node implementations). The only caller should be the rendering traversal code that is specific to each engine. -
addEndOfThisFrameListener
Add a listener that is interested in knowing when the end of this frame is reached. When this end of frame is reached, the listener will be removed from the internal list. A listener may call this method to register itself more than once in this frame. The manager will automatically remove duplicates and ensure each listener is called only once each frame.- Parameters:
l
- The listener to add
-
registerRemovedNode
Register a node that has been removed this frame. The caller should make sure the reference count has already been decremented before calling this method.- Parameters:
node
- The reference to the node that has been removed
-
registerRemovedNodes
Register nodes that have been removed this frame. The caller should make sure the reference count has already been decremented before calling this method.- Parameters:
nodes
- The reference to the nodes that has been removed
-
registerRemovedScene
Register an execution space that has been removed in this frame.- Parameters:
space
- The space that has been removed this frame
-
registerAddedNode
Register a node that has been added this frame. The caller should make sure the reference count has already been decremented before calling this method.- Parameters:
node
- The reference to the node that has been removed
-
registerAddedNodes
Register nodes that have been added this frame. The caller should make sure the reference count has already been decremented before calling this method.- Parameters:
nodes
- The reference to the nodes that has been added
-
registerAddedScene
Register an execution space that has been added in this frame.- Parameters:
space
- The space that has been added this frame
-
registerAddedExternProto
Register an externproto declaration as having been loaded this frame. This will be automatically registered as a URL node.- Parameters:
proto
- The proto declaration instance to add
-
clearRemovedNodes
void clearRemovedNodes()Clear all registered removed nodes now -
clearAddedNodes
void clearAddedNodes()Clear all registered added nodes now -
clearRemovedScenes
void clearRemovedScenes()Clear all registered removed scenes now -
clearAddedScenes
void clearAddedScenes()Clear all registered added scenes now -
getRemovedNodes
Get all the removed nodes of the named type. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Parameters:
type
- The TypeConstant primary type to get the list for- Returns:
- The list of nodes that need to be processed
-
getRemovedScripts
NodeArray getRemovedScripts()Get all the removed script nodes. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getRemovedSensors
NodeArray getRemovedSensors()Get the removed sensors. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getRemovedScenes
org.j3d.util.ObjectArray getRemovedScenes()Get the scenes that have removed or replaced during this last frame. The contents of the array shall be instances ofBasicScene
.- Returns:
- The list of nodes that need to be processed
-
getRemovedViewDependents
NodeArray getRemovedViewDependents()Get the list of nodes that require view-dependent updates.- Returns:
- The list of nodes that need to be processed
-
getRemovedBindables
NodeArray getRemovedBindables()Get all the removed bindable nodes. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getRemovedTerrains
NodeArray getRemovedTerrains()Get the removed nodes from this last frame of this specified type. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getRemovedExtSynchronizedNodes
NodeArray getRemovedExtSynchronizedNodes()Get the removed externally synchronised nodes from this last frame. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getAddedNodes
Get all the added nodes of the named type. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Parameters:
type
- The TypeConstant primary type to get the list for- Returns:
- The list of nodes that need to be processed
-
getAddedSensors
NodeArray getAddedSensors()Get the added Sensors. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getAddedScenes
org.j3d.util.ObjectArray getAddedScenes()Get the scenes that have inserted during this last frame. The scenes are the guts of an externproto or Inline node that will need fitting into the processing mechanism. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty. The contents of the array shall be instances ofBasicScene
.- Returns:
- The list of nodes that need to be processed
-
getAddedUrlNodes
NodeArray getAddedUrlNodes()Get the added nodes with URL fields that will need to have their content loaded for the first time. This list should not include scripts. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getAddedScripts
NodeArray getAddedScripts()Get the added scripts from this last frame. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getAddedViewDependents
NodeArray getAddedViewDependents()Get the list of nodes that require view-dependent updates.- Returns:
- The list of nodes that need to be processed
-
getAddedBindables
NodeArray getAddedBindables()Get the added bindable nodes from this last frame. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getAddedTerrains
NodeArray getAddedTerrains()Get the added terrain sources from this last frame. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getAddedExtSynchronizedNodes
NodeArray getAddedExtSynchronizedNodes()Get the added externally synchronised nodes from this last frame. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of nodes that need to be processed
-
getAddedExternProtos
NodeTemplateArray getAddedExternProtos()Get the added extern proto instances. This shall return an array all the time regardless of whether there is something to process or not. If there is nothing to process, the list shall be empty.- Returns:
- The list of templates that need to be processed
-