public abstract class AbstractSplineInterpolator extends Interpolator
AbstractSplineInterpolator.| Constructor and Description |
|---|
AbstractSplineInterpolator() |
AbstractSplineInterpolator(boolean reverse)
Creates a new interpolator which interpolates into the specified
direction within one second.
|
AbstractSplineInterpolator(float startValue,
float endValue)
Creates a new interpolator which interpolates from the specified
start value to the specified end value within one second.
|
AbstractSplineInterpolator(float startValue,
float endValue,
long timespan)
Creates a new interpolator which interpolates from the specified
start value to the specified end value within the specified timespan.
|
AbstractSplineInterpolator(long timespan)
Creates a new interpolator which interpolates from 0 to 1 within the
specified timespan.
|
| Modifier and Type | Method and Description |
|---|---|
float |
getFraction(float t)
Evaluates the spline function at time t, and clamps the result value between 0
and 1.
|
protected abstract Point2D.Float |
getXY(float t,
Point2D.Float p)
Evaluates the spline function at curve parameter time t.
|
protected abstract float |
getY(float t)
Evaluates the spline function at curve parameter time t.
|
protected void |
update(float fraction)
This method is empty.
|
protected void |
updateFractions(int N)
This method must be called by the subclass in the constructor.
|
finish, initialize, interpolate, isElapsed, isFinished, isSequential, replaces, setTimespanpublic AbstractSplineInterpolator()
public AbstractSplineInterpolator(long timespan)
public AbstractSplineInterpolator(boolean reverse)
reverse - Set this to true, if you want to interpolate from 1 to 0
instead of from 0 to 1.public AbstractSplineInterpolator(float startValue,
float endValue)
startValue - A value between 0 and 1.endValue - A value between 0 and 1.public AbstractSplineInterpolator(float startValue,
float endValue,
long timespan)
startValue - A value between 0 and 1.endValue - A value between 0 and 1.timespan - A timespan in milliseconds.protected void updateFractions(int N)
N - public final float getFraction(float t)
getFraction in class Interpolatort - The linear fraction between 0 and 1.protected abstract Point2D.Float getXY(float t, Point2D.Float p)
protected abstract float getY(float t)
protected void update(float fraction)
update in class Interpolatorfraction - An interpolated fraction between 0 and 1.Copyright © 2014. All Rights Reserved.