Aviatrix3D 1.0

org.j3d.aviatrix3d
Interface NodeUpdateHandler

All Known Implementing Classes:
MultiThreadRenderManager, SingleThreadRenderManager

public interface NodeUpdateHandler

Abstract representation of a piece of code that wants to manage the node update process internally to the scene graph.

This interface is never directly called by user-land code. It's used to abstract the process of maintaining a node as part of the scene graph, and the implementation of the management system behind it. The management system is responsible for coordinating and marshalling the user code into correct timing for feeding directly to the rendering pipeline and beyond. As such, it is responsible for preventing user updates at inappropriate times, and also keeping track of what has been requested to update.

Methods here provide both timing information, and ways of registering objects for further processing. When a node implementation needs to know if it is acceptable to make or allow certain changes, then these methods can be queried to provide the appropriate guidance.

Version:
$Revision: 1.14 $
Author:
Justin Couch

Method Summary
 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.
 PickingHandler getPickHandler()
          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 bounding information of the node is permitted currently.
 boolean isDataWritePermitted(java.lang.Object src)
          Check to see if writing to the data information of the node is permitted currently.
 boolean isPickingPermitted()
          Check to see if picking is permitted currently.
 void objectRemoved(DeletableSceneGraphObject obj)
          The object provided is no longer needed by its parent.
 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.
 

Method Detail

isBoundsWritePermitted

public boolean isBoundsWritePermitted(java.lang.Object src)
Check to see if writing to the bounding information of the node is permitted currently.

Parameters:
src - The object that is requesting the check
Returns:
true if the end user can write, false if not

isDataWritePermitted

public boolean isDataWritePermitted(java.lang.Object src)
Check to see if writing to the data information of the node is permitted currently.

Parameters:
src - The object that is requesting the check
Returns:
true if the end user can write, false if not

isPickingPermitted

public boolean isPickingPermitted()
Check to see if picking is permitted currently.

Returns:
true if the end user can pick, false if not

boundsChanged

public boolean boundsChanged(NodeUpdateListener l,
                             java.lang.Object src,
                             InternalNodeUpdateListener intL)
                      throws InvalidListenerSetTimingException
Notify the handler that you have updates to the SG that might alter a node's bounds.

Parameters:
l - The change requestor
src - The object that is passing this listener through.
intL - Internal listener for making callbacks at a later time to propogate the bounds changes.
Returns:
Was the notification accepted. Duplicates will return false.
Throws:
InvalidListenerSetTimingException - If called when the node called during one of the bounds/data changed callbacks

dataChanged

public void dataChanged(NodeUpdateListener l,
                        java.lang.Object src)
                 throws InvalidListenerSetTimingException
Notify the handler that you have updates to the SG that will not alter a node's bounds.

Parameters:
l - The change requestor
src - The object that is passing this listener through.
Throws:
InvalidListenerSetTimingException - If called when the node called during one of the bounds/data changed callbacks

objectRemoved

public void objectRemoved(DeletableSceneGraphObject obj)
The object provided is no longer needed by its parent. Put this on a queue for objects that could potentially be deleted next frame. Used for any scene graph object type that must be explicitly cleaned up during the OpenGL render cycle, such as textures and pBuffers.

Parameters:
obj - The object that is registering itself for deletion

getPickHandler

public PickingHandler getPickHandler()
Get the picking handler so that we can do some picking operations.

Returns:
the current instance of the picking system

shaderRequiresInit

public void shaderRequiresInit(ShaderSceneGraphObject shader,
                               boolean updateResponse)
The shader object passed requires an initialisation be performed. Queue the shader up for processing now.

Parameters:
shader - The shader instance to queue
updateResponse - true if this is being made as a response to a node's setUpdateHandler() method

shaderRequiresLogInfo

public void shaderRequiresLogInfo(ShaderSceneGraphObject shader,
                                  boolean updateResponse)
The shader object passed requires updating the log info. Queue the shader up for processing now so that at the next oppourtunity it can call glGetLogInfoARB.

Parameters:
shader - The shader instance to queue
updateResponse - true if this is being made as a response to a node's setUpdateHandler() method

Aviatrix3D 1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2005 j3d.org