Class ExponentialZoomManager
-
- All Implemented Interfaces:
-
it.unibo.alchemist.boundary.ui.api.SlideInputManager
,it.unibo.alchemist.boundary.ui.api.ZoomManager
public final class ExponentialZoomManager extends AbstractSlideInputManager implements ZoomManager
An
ExpZoomManager
converts the sliding of any physical/virtual device/control into a zoom rate through an exponential function (in this way I am sure to not see negative values ;-). Zoom = base ^ (amount of slides / normalization value).
-
-
Field Summary
Fields Modifier and Type Field Description public final static double
DEF_BASE
-
Constructor Summary
Constructors Constructor Description ExponentialZoomManager(double z, double b)
Same of ExponentialZoomManager but normalization value is 1. ExponentialZoomManager(double z, double b, double n)
Initialize a new ExpZoomManager
instance with the parameters in input.
-
Method Summary
Modifier and Type Method Description double
getZoom()
Gets the zoom rate. void
setZoom(double rate)
Sets the zoom rate. -
Methods inherited from class it.unibo.alchemist.boundary.ui.impl.AbstractSlideInputManager
dec, inc
-
Methods inherited from class it.unibo.alchemist.boundary.ui.api.SlideInputManager
dec, inc
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ExponentialZoomManager
ExponentialZoomManager(double z, double b)
Same of ExponentialZoomManager but normalization value is 1.- Parameters:
z
- is the desired initial zoom rateb
- is the base of the exponential function
-
ExponentialZoomManager
ExponentialZoomManager(double z, double b, double n)
Initialize a newExpZoomManager
instance with the parameters in input.- Parameters:
z
- is the desired initial zoom rateb
- is the base of the exponential functionn
- is the normalization value
-
-
-
-