-
- All Implemented Interfaces:
-
it.unibo.alchemist.boundary.wormhole.interfaces.PointerSpeed
public final class PointerSpeedImpl implements PointerSpeed
Implementation for PointerSpeed interface.
-
-
Field Summary
Fields Modifier and Type Field Description private PointoldPosition
-
Method Summary
Modifier and Type Method Description PointgetOldPosition()Gets the pointer's old position. PointgetCurrentPosition()Gets the pointer's current position. PointgetVariation()Gets the vector [current position - old position]. voidsetCurrentPosition(Point point)Sets the pointer's current position and, consequently, updates the old one. -
-
Method Detail
-
getOldPosition
Point getOldPosition()
Gets the pointer's old position.
-
getCurrentPosition
Point getCurrentPosition()
Gets the pointer's current position.
-
getVariation
Point getVariation()
Gets the vector [current position - old position].
-
setCurrentPosition
void setCurrentPosition(Point point)
Sets the pointer's current position and, consequently, updates the old one.
- Parameters:
point- is the Point instance representing the pointer's current position
-
-
-
-