de.grogra.imp3d
Class PickRayVisitor

java.lang.Object
  extended by de.grogra.imp3d.Visitor3D
      extended by de.grogra.imp3d.PickRayVisitor
All Implemented Interfaces:
Visitor

public class PickRayVisitor
extends Visitor3D


Field Summary
protected  Vector3d direction
           
protected  PickList list
           
protected  Point3d origin
           
 
Fields inherited from class de.grogra.imp3d.Visitor3D
layer, state, transformation
 
Fields inherited from interface de.grogra.graph.Visitor
STOP
 
Constructor Summary
PickRayVisitor()
           
 
Method Summary
 void pick(View3D view, int x, int y, Point3d origin, Vector3d direction, PickList list)
           
static void pickLine(Point3d basis, Vector3d axis, Point3d origin, Vector3d direction, Matrix4d transformation, PickList list, int tolerance)
           
static void pickLines(LineArray lines, Point3d origin, Vector3d direction, Matrix4d transformation, PickList list, int tolerance)
           
static void pickPoint(Point3d origin, Vector3d direction, Matrix4d transformation, PickList list, int tolerance)
           
protected  void visitEnterImpl(java.lang.Object object, boolean asNode, Path path)
          This method has to be implemented by subclasses.
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

direction

protected final Vector3d direction

list

protected PickList list

origin

protected final Point3d origin
Constructor Detail

PickRayVisitor

public PickRayVisitor()
Method Detail

pick

public void pick(View3D view,
                 int x,
                 int y,
                 Point3d origin,
                 Vector3d direction,
                 PickList list)

pickLine

public static void pickLine(Point3d basis,
                            Vector3d axis,
                            Point3d origin,
                            Vector3d direction,
                            Matrix4d transformation,
                            PickList list,
                            int tolerance)

pickLines

public static void pickLines(LineArray lines,
                             Point3d origin,
                             Vector3d direction,
                             Matrix4d transformation,
                             PickList list,
                             int tolerance)

pickPoint

public static void pickPoint(Point3d origin,
                             Vector3d direction,
                             Matrix4d transformation,
                             PickList list,
                             int tolerance)

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

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