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).

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static double DEF_BASE
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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 rate
        b - is the base of the exponential function
      • ExponentialZoomManager

        ExponentialZoomManager(double z, double b, double n)
        Initialize a new ExpZoomManager instance with the parameters in input.
        Parameters:
        z - is the desired initial zoom rate
        b - is the base of the exponential function
        n - is the normalization value
    • Method Detail

      • getZoom

         double getZoom()

        Gets the zoom rate.

        Returns:

        a double value representing the zoom rate

      • setZoom

         void setZoom(double rate)

        Sets the zoom rate.

        Parameters:
        rate - is the double value representing the zoom rate