-
- All Implemented Interfaces:
-
it.unibo.alchemist.boundary.wormhole.interfaces.Wormhole2D
public final class MapWormhole extends WormholeSwing<GeoPosition>
Wormhole used for maps rendering.
-
-
Field Summary
Fields Modifier and Type Field Description public final static byteMAX_ZOOM
-
Constructor Summary
Constructors Constructor Description MapWormhole(Environment<out Object, GeoPosition> env, Component comp, IMapViewPosition m)Initializes a new MapWormhole copying the state of the one in input.
-
Method Summary
Modifier and Type Method Description GeoPositiongetEnvPoint(Point viewPoint)PointgetViewPoint(GeoPosition environmentPoint)PointgetViewPosition()voidrotateAroundPoint(Point p, double a)voidsetEnvPosition(GeoPosition ep)voidoptimalZoom()voidsetViewPosition(Point p)voidsetZoom(double z)voidzoomOnPoint(Point zoomPoint, double z)-
Methods inherited from class it.unibo.alchemist.boundary.wormhole.implementation.AbstractWormhole2D
center, getMode, getViewSize, getZoom, isInsideView, setRotation -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
MapWormhole
MapWormhole(Environment<out Object, GeoPosition> env, Component comp, IMapViewPosition m)
Initializes a new MapWormhole copying the state of the one in input.- Parameters:
env- the Environmentcomp- the controlled Componentm- the IMapViewPosition
-
-
Method Detail
-
getEnvPoint
GeoPosition getEnvPoint(Point viewPoint)
-
getViewPoint
Point getViewPoint(GeoPosition environmentPoint)
-
getViewPosition
Point getViewPosition()
-
rotateAroundPoint
void rotateAroundPoint(Point p, double a)
-
setEnvPosition
void setEnvPosition(GeoPosition ep)
-
optimalZoom
void optimalZoom()
-
setViewPosition
void setViewPosition(Point p)
-
setZoom
void setZoom(double z)
-
zoomOnPoint
void zoomOnPoint(Point zoomPoint, double z)
-
-
-
-