|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.wabit.swingui.chart.effect.interp.PolynomialInterpolator
@Immutable public class PolynomialInterpolator
A general polynomial interpolator that can be used to create "ease in", "ease out", and linear interpolations.
| Constructor Summary | |
|---|---|
PolynomialInterpolator(double exponent)
Creates a new interpolator instance which uses the given exponent. |
|
| Method Summary | |
|---|---|
static PolynomialInterpolator |
easeInInstance()
Returns an "ease in" instance (exponent 2). |
static PolynomialInterpolator |
easeInInstance(double degree)
Returns an "ease in" instance of the given degree. |
static PolynomialInterpolator |
easeOutInstance()
Returns an "ease out" instance (exponent 1/2). |
static PolynomialInterpolator |
easeOutInstance(double degree)
Returns an "ease out" instance (exponent 1/degree). |
double |
value(double start,
double end,
double pct)
Calculates and returns an interpolated value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PolynomialInterpolator(double exponent)
exponent - The degree of the polynomial that controls the step size. A
value between 0 and 1 gives an "ease out" interpolator of
decreasing severity; 1.0 gives a linear interpolator; greater
than 1 gives an "ease in" instance of increasing severity.| Method Detail |
|---|
public static PolynomialInterpolator easeOutInstance()
Ease out interpolators start with relatively large steps but ease out to the end of their range with gradually smaller steps.
public static PolynomialInterpolator easeOutInstance(double degree)
Ease out interpolators start with relatively large steps but ease out to the end of their range with gradually smaller steps.
public static PolynomialInterpolator easeInInstance()
Ease in interpolators ease in with relatively small steps but approach the end of their range with increasingly larger steps.
public static PolynomialInterpolator easeInInstance(double degree)
Ease in interpolators ease in with relatively small steps but approach the end of their range with increasingly larger steps.
public double value(double start,
double end,
double pct)
Interpolator
value in interface Interpolatorstart - The value that will be returned when pct == 0.0end - The value that will be returned when pct == 1.0pct - A value between 0.0 and 1.0 that indicates how far
"along the way" the interpolated value should be. Values
outside the range 0.0..1.0 produce undefined results.
pct=0.0, the
value of start is returned. When
pct=1.0, the value of end is returned.
For values of pct between 0.0 and 1.0, the returned
value is calculated according to the particular Interpolator in
use. In general, it is not guaranteed to lie between
start and end (some interpolators may
"overshoot" either endpoint then come back to it).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||