Class StopLogicEngine

  • All Implemented Interfaces:
    StopEngine

    public class StopLogicEngine
    extends java.lang.Object
    implements StopEngine
    This contains the class to provide the logic for an animation to come to a stop. The setup defines a series of velocity gradients that gets to the desired position ending at 0 velocity. The path is computed such that the velocities are continuous
    • Constructor Summary

      Constructors 
      Constructor Description
      StopLogicEngine()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void config​(float currentPos, float destination, float currentVelocity, float maxTime, float maxAcceleration, float maxVelocity)  
      java.lang.String debug​(java.lang.String desc, float time)
      Debugging logic to log the state.
      float getInterpolation​(float v)  
      float getVelocity()  
      float getVelocity​(float x)  
      boolean isStopped()  
      • Methods inherited from class java.lang.Object

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

      • StopLogicEngine

        public StopLogicEngine()
    • Method Detail

      • debug

        public java.lang.String debug​(java.lang.String desc,
                                      float time)
        Debugging logic to log the state.
        Specified by:
        debug in interface StopEngine
        Parameters:
        desc - Description to pre append
        time - Time during animation
        Returns:
        string useful for debugging the state of the StopLogic
      • getVelocity

        public float getVelocity​(float x)
        Specified by:
        getVelocity in interface StopEngine
      • config

        public void config​(float currentPos,
                           float destination,
                           float currentVelocity,
                           float maxTime,
                           float maxAcceleration,
                           float maxVelocity)