Interface SceneGraphTraversalDetailObserver
SceneGraphTraverser
.
As this interface is an observer of the traversal process, it may perform many tasks, such as building an equivalent API. However, it should not attempt to make calls back to this class. For speed reasons, only one observer can be registered at a time. We feel this is the most common way that the class will be used (usually to generate alternate scene graphs) and the overheads of dealing with loops for multiple observers is not worth it.
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.2 $
- Author:
- Justin Couch
-
Method Summary
Modifier and TypeMethodDescriptionvoid
appearanceNode
(VRMLShapeNodeType parent, VRMLAppearanceNodeType appearance, boolean used) Notification of an appearance node.void
audioClipNode
(VRMLSoundNodeType parent, VRMLAudioClipNodeType clip, boolean used) Notification of an AudioClip based node.void
bindableNode
(VRMLGroupingNodeType parent, VRMLBindableNodeType bindable, boolean used) Notification of a bindable node.void
customNode
(VRMLNodeType parent, int fieldIndex, VRMLNodeType child, boolean used) Notification of a custom node that defines its own children types.void
geometricPropertyNode
(VRMLComponentGeometryNodeType parent, VRMLGeometricPropertyNodeType geoprop, boolean used) Notification of a geometric property node.void
geometryNode
(VRMLShapeNodeType parent, VRMLGeometryNodeType geometry, boolean used) Notification of a geometry node.void
groupingNode
(VRMLGroupingNodeType parent, VRMLGroupingNodeType group, boolean used) Notification of a grouping node.void
inlineNode
(VRMLGroupingNodeType parent, VRMLInlineNodeType inline, boolean used) Notification of an inline node.void
interpolatorNode
(VRMLGroupingNodeType parent, VRMLInterpolatorNodeType interp, boolean used) Notification of any form of interpolator nodevoid
lightNode
(VRMLGroupingNodeType parent, VRMLLightNodeType light, boolean used) Notification of a light node.void
materialNode
(VRMLAppearanceNodeType parent, VRMLMaterialNodeType material, boolean used) Notification of a Material node.void
miscellaneousNode
(VRMLNodeType parent, int fieldIndex, VRMLNodeType node, boolean used) Notification of an unknown or miscellaneous node type that does not fit into any of the other categories.void
protoNode
(VRMLNodeType parent, VRMLProtoInstance proto, boolean used) Notification of a proto instance.void
scriptNode
(VRMLGroupingNodeType parent, VRMLScriptNodeType script, boolean used) Notification of a script node.void
sensorNode
(VRMLGroupingNodeType parent, VRMLSensorNodeType sensor, boolean used) Notification of any form of sensor node.void
shapeNode
(VRMLGroupingNodeType parent, VRMLShapeNodeType shape, boolean used) Notification of a shape node.void
soundNode
(VRMLGroupingNodeType parent, VRMLSoundNodeType sound, boolean used) Notification of a sound node.void
textureNode
(VRMLAppearanceNodeType parent, VRMLTextureNodeType texture, boolean used) Notification of a texture node.void
textureTransformNode
(VRMLAppearanceNodeType parent, VRMLTextureTransformNodeType transform, boolean used) Notification of a TextureTransform node.
-
Method Details
-
groupingNode
Notification of a grouping node.- Parameters:
parent
- The parent group of this nodegroup
- The grouping node that has been foundused
- true if the node reference is actually a USE
-
inlineNode
Notification of an inline node.- Parameters:
parent
- The parent group of this nodeinline
- The inline node that has been foundused
- true if the node reference is actually a USE
-
lightNode
Notification of a light node.- Parameters:
parent
- The parent group of this nodelight
- The light node that has been foundused
- true if the node reference is actually a USE
-
bindableNode
Notification of a bindable node.- Parameters:
parent
- The parent group of this nodebindable
- The bindable node that has been foundused
- true if the node reference is actually a USE
-
shapeNode
Notification of a shape node.- Parameters:
parent
- The parent group of this nodeshape
- The shape node that has been foundused
- true if the node reference is actually a USE
-
appearanceNode
Notification of an appearance node.- Parameters:
parent
- The parent shape node of this nodeappearance
- The appearance node that has been foundused
- true if the node reference is actually a USE
-
materialNode
Notification of a Material node.- Parameters:
parent
- The parent appearance of this nodematerial
- The material node that has been foundused
- true if the node reference is actually a USE
-
textureNode
Notification of a texture node. If the node is a movie texture node it will be reported here as well as the audioclip notification when the child of a sound node.- Parameters:
parent
- The parent appearance of this nodetexture
- The texture node that has been foundused
- true if the node reference is actually a USE
-
textureTransformNode
void textureTransformNode(VRMLAppearanceNodeType parent, VRMLTextureTransformNodeType transform, boolean used) Notification of a TextureTransform node.- Parameters:
parent
- The parent appearance of this nodetransform
- The texture transform node that has been foundused
- true if the node reference is actually a USE
-
geometryNode
Notification of a geometry node.- Parameters:
parent
- The parent shape node of this nodegeometry
- The geometry node that has been foundused
- true if the node reference is actually a USE
-
geometricPropertyNode
void geometricPropertyNode(VRMLComponentGeometryNodeType parent, VRMLGeometricPropertyNodeType geoprop, boolean used) Notification of a geometric property node.- Parameters:
parent
- The parent component geometry of this nodegeoprop
- The geometric property node that has been foundused
- true if the node reference is actually a USE
-
soundNode
Notification of a sound node.- Parameters:
parent
- The parent group of this nodesound
- The sound node that has been foundused
- true if the node reference is actually a USE
-
audioClipNode
Notification of an AudioClip based node. This may be a movie texture or ordinary audio clip node.- Parameters:
parent
- The parent sound node of this nodeclip
- The audioclip node that has been foundused
- true if the node reference is actually a USE
-
sensorNode
Notification of any form of sensor node. Anchors are not considered to be an anchor node.- Parameters:
parent
- The parent group of this nodesensor
- The sensor node that has been foundused
- true if the node reference is actually a USE
-
interpolatorNode
Notification of any form of interpolator node- Parameters:
parent
- The parent group of this nodeinterp
- The interpolator node that has been foundused
- true if the node reference is actually a USE
-
scriptNode
Notification of a script node.- Parameters:
parent
- The parent group of this nodescript
- The script node that has been foundused
- true if the node reference is actually a USE
-
protoNode
Notification of a proto instance.- Parameters:
parent
- The parent node of this nodeproto
- The proto node that has been foundused
- true if the node reference is actually a USE
-
customNode
Notification of a custom node that defines its own children types. A typical custom node is a proto or script.- Parameters:
parent
- The parent node of this nodefieldIndex
- The index of the field that the child belongs tochild
- The child node that has been foundused
- true if the node reference is actually a USE
-
miscellaneousNode
Notification of an unknown or miscellaneous node type that does not fit into any of the other categories. For example WorldInfo.- Parameters:
parent
- The parent node of this nodefieldIndex
- The index of the field that the child belongs tonode
- The node that has been foundused
- true if the node reference is actually a USE
-