org.xith3d.scenegraph.traversal.impl
Class MaterialTraversal

java.lang.Object
  extended by org.xith3d.scenegraph.traversal.impl.MaterialTraversal
All Implemented Interfaces:
TraversalCallback

public class MaterialTraversal
extends java.lang.Object
implements TraversalCallback

This class traverses a subgroup of the scenegraph and applies a Material to each found Shape3D.


Constructor Summary
MaterialTraversal(Material mat)
           
 
Method Summary
 boolean traversalCheckGroup(GroupNode group)
          This method is called for each Group in the traversal.
 boolean traversalOperation(Node node)
          This method is called for each Node in the traversed Group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MaterialTraversal

public MaterialTraversal(Material mat)
Method Detail

traversalOperation

public boolean traversalOperation(Node node)
Description copied from interface: TraversalCallback
This method is called for each Node in the traversed Group. It implements the operation to be done for the Nodes.

Specified by:
traversalOperation in interface TraversalCallback
Parameters:
node - the current Node in the traversal
Returns:
if false, the traversal is stopped after this node

traversalCheckGroup

public boolean traversalCheckGroup(GroupNode group)
Description copied from interface: TraversalCallback
This method is called for each Group in the traversal. It must return true to be further traversed (and its children)

Specified by:
traversalCheckGroup in interface TraversalCallback
Parameters:
group - the Group to be checked
Returns:
if false the traversal is not stopped, but the children are not further traversed