de.grogra.imp3d
Class DisplayVisitor

java.lang.Object
  extended by de.grogra.imp3d.Visitor3D
      extended by de.grogra.imp3d.DisplayVisitor
All Implemented Interfaces:
Visitor
Direct Known Subclasses:
FluxLightVisitor, FluxSceneVisitor, GL20DisplayVisitor, GLDisplay.GLVisitor, SceneVisitor

public abstract class DisplayVisitor
extends Visitor3D

This abstract visitor is used as base class

Author:
Ole Kniemeyer

Field Summary
protected  java.lang.Object lastEntered
           
protected  boolean lastEnteredIsNode
           
 
Fields inherited from class de.grogra.imp3d.Visitor3D
layer, state, transformation
 
Fields inherited from interface de.grogra.graph.Visitor
STOP
 
Constructor Summary
DisplayVisitor()
           
 
Method Summary
 Shader getCurrentShader()
           
 void init(GraphState gs, Matrix4d t, ViewConfig3D view, boolean checkLayer)
           
protected  boolean isInVisibleLayer(java.lang.Object o, boolean asNode)
           
protected  Shader resolveShader(Shader shader)
           
protected  void visitEnterImpl(java.lang.Object object, boolean asNode, Path path)
          This method has to be implemented by subclasses.
protected abstract  void visitImpl(java.lang.Object object, boolean asNode, Shader s, Path path)
           
protected  void visitLeaveImpl(java.lang.Object object, boolean asNode, Path path)
          This method has to be implemented by subclasses.
 
Methods inherited from class de.grogra.imp3d.Visitor3D
getCurrentTransformation, getGraphState, init, visitEnter, visitEnter, visitInstanceEnter, visitInstanceLeave, visitLeave
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastEntered

protected java.lang.Object lastEntered

lastEnteredIsNode

protected boolean lastEnteredIsNode
Constructor Detail

DisplayVisitor

public DisplayVisitor()
Method Detail

getCurrentShader

public Shader getCurrentShader()

init

public void init(GraphState gs,
                 Matrix4d t,
                 ViewConfig3D view,
                 boolean checkLayer)

isInVisibleLayer

protected boolean isInVisibleLayer(java.lang.Object o,
                                   boolean asNode)

resolveShader

protected Shader resolveShader(Shader shader)

visitEnterImpl

protected void visitEnterImpl(java.lang.Object object,
                              boolean asNode,
                              Path path)
Description copied from class: Visitor3D
This method has to be implemented by subclasses. It is invoked when object is entered.

Specified by:
visitEnterImpl in class Visitor3D
Parameters:
object - the object being entered
asNode - is object a node or an edge?
path - the path to object if object is a node, the path to the node where object points to if object is an edge

visitImpl

protected abstract void visitImpl(java.lang.Object object,
                                  boolean asNode,
                                  Shader s,
                                  Path path)

visitLeaveImpl

protected void visitLeaveImpl(java.lang.Object object,
                              boolean asNode,
                              Path path)
Description copied from class: Visitor3D
This method has to be implemented by subclasses. It is invoked when object is left.

Specified by:
visitLeaveImpl in class Visitor3D
Parameters:
object - the object being left
asNode - is object a node or an edge?
path - the path to object if object is a node, the path to the node where object points to if object is an edge