public class Motion extends Object
Constructor and Description |
---|
Motion(Function function,
int startValue,
int stopValue,
long duration)
Creates a motion.
|
Modifier and Type | Method and Description |
---|---|
long |
getDuration()
Gets the duration of this motion.
|
Function |
getFunction()
Gets the function of this motion.
|
int |
getStartValue()
Gets the start value of this motion.
|
int |
getStopValue()
Gets the stop value of this motion.
|
int |
getValue(long elapsedTime)
Returns the value of this motion for a specific elapsed time.
|
public Motion(Function function, int startValue, int stopValue, long duration)
function
- the function of the motion.startValue
- the start value of the motion.stopValue
- the stop value of the motion.duration
- the duration of the motion.public long getDuration()
public Function getFunction()
public int getStartValue()
public int getStopValue()
public int getValue(long elapsedTime)
elapsedTime
- the elapsed time.