public class SpringStopEngine implements StopEngine


This contains the class to provide the logic for an animation to come to a stop using a spring model.

Summary

Public constructors

Public methods

String
debug(String desc, float time)
float
float
getInterpolation(float time)
float
float
getVelocity(float time)
boolean
void
springConfig(
    float currentPos,
    float target,
    float currentVelocity,
    float mass,
    float stiffness,
    float damping,
    float stopThreshold,
    int boundaryMode
)

Public constructors

SpringStopEngine

Added in 1.1.0
public SpringStopEngine()

Public methods

debug

Added in 1.1.0
public String debug(String desc, float time)

getAcceleration

Added in 1.1.0
public float getAcceleration()

getInterpolation

Added in 1.1.0
public float getInterpolation(float time)

getVelocity

Added in 1.1.0
public float getVelocity()

getVelocity

Added in 1.1.0
public float getVelocity(float time)

isStopped

Added in 1.1.0
public boolean isStopped()

springConfig

Added in 1.1.0
public void springConfig(
    float currentPos,
    float target,
    float currentVelocity,
    float mass,
    float stiffness,
    float damping,
    float stopThreshold,
    int boundaryMode
)