de.grogra.imp3d.ray
Class Tree

java.lang.Object
  extended by de.grogra.imp3d.objects.SceneTree
      extended by de.grogra.imp3d.objects.SceneTreeWithShader
          extended by de.grogra.imp3d.ray.Tree
All Implemented Interfaces:
Visitor, javax.swing.tree.TreeModel

public class Tree
extends SceneTreeWithShader


Nested Class Summary
 
Nested classes/interfaces inherited from class de.grogra.imp3d.objects.SceneTreeWithShader
SceneTreeWithShader.Leaf
 
Nested classes/interfaces inherited from class de.grogra.imp3d.objects.SceneTree
SceneTree.InnerNode, SceneTree.Node, SceneTree.Visitor
 
Field Summary
 
Fields inherited from class de.grogra.imp3d.objects.SceneTree
state
 
Fields inherited from interface de.grogra.graph.Visitor
STOP
 
Constructor Summary
Tree(View3D scene)
           
 
Method Summary
protected  boolean acceptLeaf(java.lang.Object object, boolean asNode)
          This method defines for which objects of the graph a SceneTree.Leaf node shall be created.
protected  SceneTree.InnerNode createInnerNode()
          This factory method is used by SceneTree.createTree(boolean) to create an inner node.
protected  SceneTree.Leaf createLeaf(java.lang.Object object, boolean asNode, long id)
          This factory method is used by SceneTree.createTree(boolean) to create a leaf.
 
Methods inherited from class de.grogra.imp3d.objects.SceneTreeWithShader
getCurrentInterior, getCurrentShader, init, resolveShader, visitLeave
 
Methods inherited from class de.grogra.imp3d.objects.SceneTree
accept, addTreeModelListener, createTree, createTree, getChild, getChildCount, getGraphState, getIndexOfChild, getRoot, isLeaf, removeTreeModelListener, valueForPathChanged, visitEnter, visitInstanceEnter, visitInstanceLeave
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tree

public Tree(View3D scene)
Method Detail

acceptLeaf

protected boolean acceptLeaf(java.lang.Object object,
                             boolean asNode)
Description copied from class: SceneTree
This method defines for which objects of the graph a SceneTree.Leaf node shall be created.

Specified by:
acceptLeaf in class SceneTree
Parameters:
object - an object of the graph
asNode - is object a node or an edge?
Returns:
true iff a leaf shall be created for the object

createInnerNode

protected SceneTree.InnerNode createInnerNode()
Description copied from class: SceneTree
This factory method is used by SceneTree.createTree(boolean) to create an inner node.

Overrides:
createInnerNode in class SceneTree
Returns:
newly created inner node

createLeaf

protected SceneTree.Leaf createLeaf(java.lang.Object object,
                                    boolean asNode,
                                    long id)
Description copied from class: SceneTree
This factory method is used by SceneTree.createTree(boolean) to create a leaf. Note that the implementation has to invoke SceneTree.init(Leaf) on the created leaf.

Specified by:
createLeaf in class SceneTree
Parameters:
object - object of leaf
asNode - represents leaf a node or an edge?
id - id to pass to the leaf constructor
Returns:
newly create leaf