Package com.jme3.anim.tween
Interface Tween
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
AbstractTween
,Action
,BaseAction
,BlendableAction
,BlendAction
,ClipAction
Represents some action that interpolates across input between 0
and some length value. (For example, movement, rotation, fading.)
It's also possible to have zero length 'instant' tweens.
-
Method Summary
Modifier and TypeMethodDescriptiondouble
Returns the length of the tween.boolean
interpolate
(double t) Sets the implementation specific interpolation to the specified 'tween' value as a value in the range from 0 to getLength().
-
Method Details
-
getLength
double getLength()Returns the length of the tween. If 't' represents time in seconds then this is the notional time in seconds that the tween will run. Note: all the caveats are because tweens may be externally scaled in such a way that 't' no longer represents actual time.- Returns:
- the duration (in de-scaled seconds)
-
interpolate
boolean interpolate(double t) Sets the implementation specific interpolation to the specified 'tween' value as a value in the range from 0 to getLength(). If the value is greater or equal to getLength() then it is internally clamped and the method returns false. If 't' is still in the tween's range then this method returns true.- Parameters:
t
- animation time (in de-scaled seconds)- Returns:
- true if t>length(), otherwise false
-