class StopLogicEngine : 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

Summary

Nested types

Public constructors

Public functions

Unit
config(
    currentPos: Float,
    destination: Float,
    currentVelocity: Float,
    maxTime: Float,
    maxAcceleration: Float,
    maxVelocity: Float
)
String!
debug(desc: String!, time: Float)

Debugging logic to log the state.

Float
Float
Float
Boolean

Public constructors

StopLogicEngine

Added in 1.1.0
StopLogicEngine()

Public functions

config

Added in 1.1.0
fun config(
    currentPos: Float,
    destination: Float,
    currentVelocity: Float,
    maxTime: Float,
    maxAcceleration: Float,
    maxVelocity: Float
): Unit

debug

Added in 1.1.0
fun debug(desc: String!, time: Float): String!

Debugging logic to log the state.

Parameters
desc: String!

Description to pre append

time: Float

Time during animation

Returns
String!

string useful for debugging the state of the StopLogic

getInterpolation

Added in 1.1.0
fun getInterpolation(v: Float): Float

getVelocity

Added in 1.1.0
fun getVelocity(): Float

getVelocity

Added in 1.1.0
fun getVelocity(x: Float): Float

isStopped

Added in 1.1.0
fun isStopped(): Boolean