Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface FrameStateManager

All Known Implementing Classes:
GeneralisedFrameStateManager

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.10 $
Author:
Justin Couch

Method Summary
 void addEndOfThisFrameListener(FrameStateListener l)
          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 clearAddedNodes()
          Clear all registered added nodes now
 void clearAddedScenes()
          Clear all registered added scenes now
 void clearRemovedNodes()
          Clear all registered removed nodes now
 void clearRemovedScenes()
          Clear all registered removed scenes now
 void frameFinished()
          Notification that the current frame is finished.
 NodeArray getAddedBindables()
          Get the added bindable nodes from this last frame.
 NodeTemplateArray getAddedExternProtos()
          Get the added extern proto instances.
 NodeArray getAddedExtSynchronizedNodes()
          Get the added externally synchronised nodes from this last frame.
 NodeArray getAddedNodes(int type)
          Get all the added nodes of the named type.
 ObjectArray getAddedScenes()
          Get the scenes that have inserted during this last frame.
 NodeArray getAddedScripts()
          Get the added scripts from this last frame.
 NodeArray getAddedSensors()
          Get the added Sensors.
 NodeArray getAddedTerrains()
          Get the added terrain sources from this last frame.
 NodeArray getAddedUrlNodes()
          Get the added nodes with URL fields that will need to have their content loaded for the first time.
 NodeArray getAddedViewDependents()
          Get the list of nodes that require view-dependent updates.
 NodeArray getRemovedBindables()
          Get all the removed bindable nodes.
 NodeArray getRemovedExtSynchronizedNodes()
          Get the removed externally synchronised nodes from this last frame.
 NodeArray getRemovedNodes(int type)
          Get all the removed nodes of the named type.
 ObjectArray getRemovedScenes()
          Get the scenes that have removed or replaced during this last frame.
 NodeArray getRemovedScripts()
          Get all the removed script nodes.
 NodeArray getRemovedSensors()
          Get the removed sensors.
 NodeArray getRemovedTerrains()
          Get the removed nodes from this last frame of this specified type.
 NodeArray getRemovedViewDependents()
          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 registerAddedExternProto(VRMLNodeTemplate proto)
          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 registerAddedScene(VRMLExecutionSpace space)
          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 registerRemovedScene(VRMLExecutionSpace space)
          Register an execution space that has been removed in this frame.
 void setErrorReporter(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 Detail

setErrorReporter

public void setErrorReporter(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

public 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

clear

public 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

public 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

public void addEndOfThisFrameListener(FrameStateListener l)
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

public void registerRemovedNode(VRMLNode node)
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

public void registerRemovedNodes(VRMLNode[] nodes)
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

public void registerRemovedScene(VRMLExecutionSpace space)
Register an execution space that has been removed in this frame.

Parameters:
space - The space that has been removed this frame

registerAddedNode

public void registerAddedNode(VRMLNode node)
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

public void registerAddedNodes(VRMLNode[] nodes)
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

public void registerAddedScene(VRMLExecutionSpace space)
Register an execution space that has been added in this frame.

Parameters:
space - The space that has been added this frame

registerAddedExternProto

public void registerAddedExternProto(VRMLNodeTemplate proto)
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

public void clearRemovedNodes()
Clear all registered removed nodes now


clearAddedNodes

public void clearAddedNodes()
Clear all registered added nodes now


clearRemovedScenes

public void clearRemovedScenes()
Clear all registered removed scenes now


clearAddedScenes

public void clearAddedScenes()
Clear all registered added scenes now


getRemovedNodes

public NodeArray getRemovedNodes(int type)
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

public 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

public 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

public ObjectArray getRemovedScenes()
Get the scenes that have removed or replaced during this last frame. The contents of the array shall be instances of BasicScene.

Returns:
The list of nodes that need to be processed

getRemovedViewDependents

public NodeArray getRemovedViewDependents()
Get the list of nodes that require view-dependent updates.

Returns:
The list of nodes that need to be processed

getRemovedBindables

public 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

public 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

public 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

public NodeArray getAddedNodes(int type)
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

public 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

public 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 of BasicScene.

Returns:
The list of nodes that need to be processed

getAddedUrlNodes

public 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

public 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

public NodeArray getAddedViewDependents()
Get the list of nodes that require view-dependent updates.

Returns:
The list of nodes that need to be processed

getAddedBindables

public 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

public 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

public 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

public 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

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium