interactors
Class MeasurementInteractor

java.lang.Object
  extended by interactors.Interactor
      extended by interactors.MeasurementInteractor

public class MeasurementInteractor
extends Interactor

Interactor for displaying distance.


Field Summary
private  boolean measuring
          specfies if the interactio is currently measuring
 
Fields inherited from class interactors.Interactor
handler
 
Constructor Summary
MeasurementInteractor(InteractionHandler handler)
          Constructs the measurement interactor.
 
Method Summary
 void draw(GL gl, GLU glu, GLUT glut)
          Draws a line between the picked point and the current mouse location.
 java.awt.Cursor getCursor()
          Gets the measurement cursor.
 void mousePressed(java.awt.event.MouseEvent arg0)
          Left click selects a new point for measurement.
 void startInteraction()
          Deselects the selected object.
 
Methods inherited from class interactors.Interactor
endInteraction, keyPressed, keyReleased, mouseDragged, mouseMoved, mouseReleased
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

measuring

private boolean measuring
specfies if the interactio is currently measuring

Constructor Detail

MeasurementInteractor

public MeasurementInteractor(InteractionHandler handler)
Constructs the measurement interactor.

Parameters:
handler - - the interaction handler.
Method Detail

startInteraction

public void startInteraction()
Deselects the selected object.

Overrides:
startInteraction in class Interactor

draw

public void draw(GL gl,
                 GLU glu,
                 GLUT glut)
Draws a line between the picked point and the current mouse location.

Overrides:
draw in class Interactor

getCursor

public java.awt.Cursor getCursor()
Gets the measurement cursor.

Overrides:
getCursor in class Interactor

mousePressed

public void mousePressed(java.awt.event.MouseEvent arg0)
Left click selects a new point for measurement. Right click ends the interaction.

Overrides:
mousePressed in class Interactor