Class AbstractMovement

All Implemented Interfaces:
Direct Known Subclasses:
BounceOut, ElasticOut, ExpoOut, LinearInOut, SinusDecreaseVariation, SinusVariation

public abstract class AbstractMovement
extends java.lang.Object
implements IMovement
Abstract implementation of IMovement.
  • Field Summary

    Modifier and Type Field Description
    protected double duration  
    protected double max  
    protected double min  
  • Constructor Summary

    Constructor Description
  • Method Summary

    Modifier and Type Method Description
    abstract double getValue​(double step)
    Get value at step 'step'
    void init​(double minValue, double maxValue, int steps)
    Set up the movement. with init( 0, 1, 50), it will take 50 steps to go from 0 to 1.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • min

      protected double min
    • max

      protected double max
    • duration

      protected double duration
  • Constructor Details

  • Method Details

    • getValue

      public abstract double getValue​(double step)
      Description copied from interface: IMovement
      Get value at step 'step'
      Specified by:
      getValue in interface IMovement
      current value.
    • init

      public void init​(double minValue, double maxValue, int steps)
      Description copied from interface: IMovement
      Set up the movement. with init( 0, 1, 50), it will take 50 steps to go from 0 to 1. There is no garanties that getValue will return only values between min and max. The only thing you know is : getValue( 0 ) = 0 and getValue( 50 ) = 1
      Specified by:
      init in interface IMovement
      minValue - - min (start) value
      maxValue - - max( end ) value
      steps - - number of steps