|
Copyright 2012-04-26 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.monte.media.Interpolator
org.monte.media.AbstractSplineInterpolator
public abstract class AbstractSplineInterpolator
AbstractSplineInterpolator.
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
float |
getFraction(float t)
Evaluates the spline function at time t, and clamps the result value between 0 and 1. |
protected abstract java.awt.geom.Point2D.Float |
getXY(float t,
java.awt.geom.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. |
| Methods inherited from class org.monte.media.Interpolator |
|---|
finish, initialize, interpolate, isElapsed, isFinished, isSequential, replaces, setTimespan |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public 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.| Method Detail |
|---|
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 java.awt.geom.Point2D.Float getXY(float t,
java.awt.geom.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 2012-04-26 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||