Class SpringStopEngine
- java.lang.Object
-
- androidx.constraintlayout.core.motion.utils.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.
-
-
Constructor Summary
Constructors Constructor Description SpringStopEngine()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringdebug(java.lang.String desc, float time)floatgetAcceleration()floatgetInterpolation(float time)floatgetVelocity()floatgetVelocity(float time)booleanisStopped()voidspringConfig(float currentPos, float target, float currentVelocity, float mass, float stiffness, float damping, float stopThreshold, int boundaryMode)
-
-
-
Method Detail
-
debug
public java.lang.String debug(java.lang.String desc, float time)- Specified by:
debugin interfaceStopEngine
-
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:
getVelocityin interfaceStopEngine
-
getInterpolation
public float getInterpolation(float time)
- Specified by:
getInterpolationin interfaceStopEngine
-
getAcceleration
public float getAcceleration()
-
getVelocity
public float getVelocity()
- Specified by:
getVelocityin interfaceStopEngine
-
isStopped
public boolean isStopped()
- Specified by:
isStoppedin interfaceStopEngine
-
-