Xj3D VRML/X3D Code API

org.web3d.vrml.nodes
Interface SceneGraphTraversalSimpleObserver

All Known Implementing Classes:
CRProtoCreator, GeneralisedFrameStateManager, NodeCopier, ProtoCopier, TestCompressor, X3DBinaryRetainedExporter, X3DClassicRetainedExporter, X3DXMLRetainedExporter

public interface SceneGraphTraversalSimpleObserver

A simplified version of the SceneGraphTraversalDetailObserver that only provides the basic parent-child information.

The observer will report the top of a use hierarchy. If the traverser, in it's internal references, detects a reference re-use that is indicative of a DEF/USE situation then the flag passed with each method call will be set true. After reporting the USE, the traverser will not descend that part of the scene graph any further.

When reporting the parent node, if the root is the root node of the VRML file or the body of a Proto, the parent reference will be null - regardless of the type of node.

Version:
$Revision: 1.1 $
Author:
Justin Couch

Method Summary
 void observedNode(VRMLNodeType parent, VRMLNodeType child, int field, boolean used)
          Notification of a child node.
 

Method Detail

observedNode

public void observedNode(VRMLNodeType parent,
                         VRMLNodeType child,
                         int field,
                         boolean used)
Notification of a child node.

Parameters:
parent - The parent node of this node
child - The child node that is being observed
field - The index of the child field in its parent node
used - true if the node reference is actually a USE

Xj3D VRML/X3D Code API

Copyright © 2001 - 2005 Web3D Consortium