|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinteractors.Interactor
interactors.CoordinatesInteractor
public class CoordinatesInteractor
Interaction for modifying the coordinates of an object.
Field Summary | |
---|---|
(package private) float[] |
coords
the coordinates of the selected object |
(package private) int |
selected
the index of the currently selected vertex |
Fields inherited from class interactors.Interactor |
---|
handler |
Constructor Summary | |
---|---|
CoordinatesInteractor(InteractionHandler handler)
Constructs the coordinates interactor. |
Method Summary | |
---|---|
void |
draw(GL gl,
GLU glu,
GLUT glut)
Draws the coordinates of the selected object. |
java.awt.Cursor |
getCursor()
Gets the coordinates cursor. |
void |
keyPressed(java.awt.event.KeyEvent arg0)
Overrides the key shortcuts. |
void |
mouseDragged(java.awt.event.MouseEvent arg0)
If a vertex is selected, then a mouse drag moves the selected vertex. |
void |
mousePressed(java.awt.event.MouseEvent arg0)
Processes mouse presses: - Left click selects a new object if no object is selected - Left click without control down selects a coordinate if an object is currently selected - Left click with control down add a new coordinate to the selected object - Right click deselcted the current vertex if a vertex is selected, deselects the current object or ends the interaction if no object is selecteed |
void |
mouseReleased(java.awt.event.MouseEvent arg0)
If a vertex was dragged, then the coordinates of the selected object are modified to reflect the change. |
void |
startInteraction()
Gets the coordinates of the currently selected object. |
Methods inherited from class interactors.Interactor |
---|
endInteraction, keyReleased, mouseMoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
float[] coords
int selected
Constructor Detail |
---|
public CoordinatesInteractor(InteractionHandler handler)
handler
- - the interaction handlerMethod Detail |
---|
public java.awt.Cursor getCursor()
getCursor
in class Interactor
public void startInteraction()
startInteraction
in class Interactor
public void draw(GL gl, GLU glu, GLUT glut)
draw
in class Interactor
public void keyPressed(java.awt.event.KeyEvent arg0)
keyPressed
in class Interactor
public void mousePressed(java.awt.event.MouseEvent arg0)
mousePressed
in class Interactor
public void mouseReleased(java.awt.event.MouseEvent arg0)
mouseReleased
in class Interactor
public void mouseDragged(java.awt.event.MouseEvent arg0)
mouseDragged
in class Interactor
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |