com.jme3.scene
Class SceneGraphVisitorAdapter

java.lang.Object
  extended by com.jme3.scene.SceneGraphVisitorAdapter
All Implemented Interfaces:
SceneGraphVisitor

public class SceneGraphVisitorAdapter
extends java.lang.Object
implements SceneGraphVisitor

SceneGraphVisitorAdapter is used to traverse the scene graph tree. The adapter version of the interface simply separates between the geometries and the nodes by supplying visit methods that take them. Use by calling Spatial.depthFirstTraversal(com.jme3.scene.SceneGraphVisitor) or Spatial.breadthFirstTraversal(com.jme3.scene.SceneGraphVisitor).


Constructor Summary
SceneGraphVisitorAdapter()
           
 
Method Summary
 void visit(Geometry geom)
          Called when a Geometry is visited.
 void visit(Node geom)
          Called when a Node is visited.
 void visit(Spatial spatial)
          Called when a spatial is visited in the scene graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SceneGraphVisitorAdapter

public SceneGraphVisitorAdapter()
Method Detail

visit

public void visit(Geometry geom)
Called when a Geometry is visited.

Parameters:
geom - The visited geometry

visit

public void visit(Node geom)
Called when a Node is visited.

Parameters:
geom - The visited node

visit

public final void visit(Spatial spatial)
Description copied from interface: SceneGraphVisitor
Called when a spatial is visited in the scene graph.

Specified by:
visit in interface SceneGraphVisitor
Parameters:
spatial - The visited spatial