Class SpringStopEngine

  • All Implemented Interfaces:
    StopEngine

    public class SpringStopEngine
    extends java.lang.Object
    implements StopEngine
    This contains the class to provide the logic for an animation to come to a stop using a spring model.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String debug​(java.lang.String desc, float time)  
      float getAcceleration()  
      float getInterpolation​(float time)  
      float getVelocity()  
      float getVelocity​(float time)  
      boolean isStopped()  
      void springConfig​(float currentPos, float target, float currentVelocity, float mass, float stiffness, float damping, float stopThreshold, int boundaryMode)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringStopEngine

        public SpringStopEngine()
    • Method Detail

      • debug

        public java.lang.String debug​(java.lang.String desc,
                                      float time)
        Specified by:
        debug in interface StopEngine
      • springConfig

        public void springConfig​(float currentPos,
                                 float target,
                                 float currentVelocity,
                                 float mass,
                                 float stiffness,
                                 float damping,
                                 float stopThreshold,
                                 int boundaryMode)
      • getVelocity

        public float getVelocity​(float time)
        Specified by:
        getVelocity in interface StopEngine
      • getAcceleration

        public float getAcceleration()