nl.tudelft.goal.ut2004.visualizer.timeline.map
Class MapController
java.lang.Object
java.awt.event.MouseAdapter
javax.swing.event.MouseInputAdapter
nl.tudelft.goal.ut2004.visualizer.timeline.map.MapController
- All Implemented Interfaces:
- MouseListener, MouseMotionListener, MouseWheelListener, EventListener, MouseInputListener
public class MapController
- extends MouseInputAdapter
- implements MouseListener, MouseMotionListener
Class for controling viewport in map.
The view of map is specified in MapViewpoint
, it consists from
- center point - the point in worldspace at which the eye is looking at
- eye point - the worldspace point from which is player looking at the center point
- up vector - determines which direction is up, in worldspace
These three components are always orthogonal (the angle between them is 90 degrees).
The user is controlling the view by dragging the mouse while pressing the buttons:
- Left button - deltaX will move your view angle to left or right,
deltaY will move you forward or backward (no change in height)
- Right button - freely change the direction at which you are looking.
- Left and right button - change position while maintaining the view vector.
deltaX - left or right, deltaY up or down.
- Triple click anywhere will turn your view to the origin (0,0,0), where map usually is
X axis is green,
Y axis is red
Z axis is up/down (up direction is negative)
- Author:
- Honza
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapController
public MapController(MapGLPanel panel,
MapViewpoint mapViewpoint,
cz.cuni.amis.pogamut.unreal.communication.worldview.map.Box bounds)
registerListeners
public void registerListeners()
unregisterListeners
public void unregisterListeners()
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked
in interface MouseListener
- Overrides:
mouseClicked
in class MouseAdapter
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed
in interface MouseListener
- Overrides:
mousePressed
in class MouseAdapter
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interface MouseListener
- Overrides:
mouseReleased
in class MouseAdapter
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interface MouseMotionListener
- Overrides:
mouseDragged
in class MouseAdapter
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.