public class RMInterpolator
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
RMInterpolator.Bounce
Parameterizable bounce interpolator class.
|
static class |
RMInterpolator.Direction |
static class |
RMInterpolator.Periodic
An Interpolator subclass that can be used for periodic (ie looping) motion.
|
Modifier and Type | Field and Description |
---|---|
static RMInterpolator |
BOUNCE
Bounce interpolator.
|
static RMInterpolator |
EASE_BOTH
Ease Both interpolator.
|
static RMInterpolator |
EASE_BOTH_CUBIC
Ease Both interpolator.
|
static RMInterpolator |
EASE_IN
Ease In interpolator.
|
static RMInterpolator |
EASE_IN_CUBIC
Ease In interpolator.
|
static RMInterpolator |
EASE_OUT
Ease Out interpolator.
|
static RMInterpolator |
EASE_OUT_CUBIC
Ease Out interpolator.
|
static RMInterpolator |
LINEAR
Linear interpolator.
|
static RMInterpolator |
ONE_SHOT
One Shot interpolator.
|
static RMInterpolator |
RANDOM
Random interpolator.
|
Constructor and Description |
---|
RMInterpolator()
Creates a new interpolator.
|
RMInterpolator(RMInterpolator.Direction aDirection)
Creates a new interpolator with given direction.
|
Modifier and Type | Method and Description |
---|---|
RMInterpolator |
clone()
Standard clone implementation.
|
RMInterpolator.Direction |
getDirection()
Returns the interpolator direction.
|
static RMInterpolator |
getInterpolator(int anIndex)
Returns the individual common interpolator at given index.
|
static RMInterpolator |
getInterpolator(java.lang.String aName)
Returns a shared interpolator for given name.
|
static int |
getInterpolatorCount()
Returns number of shared common interpolators.
|
java.lang.String |
getName()
Returns the name of this interpolator.
|
static RMInterpolator |
getNewInterpolator(java.lang.String aName)
Returns a new interpolator instance for a given name.
|
double |
getRatio(double aRatio)
Returns a new ratio given normal ratio.
|
double |
getValue(double aRatio)
Returns an interpolated value for 0 & 1 given a ratio.
|
double |
getValue(double aRatio,
double aStart,
double anEnd)
Returns a value given a ratio and start/end values.
|
double |
interpolate(double aRatio,
double aStart,
double aEnd)
Direction In interpolation.
|
double |
interpolateBoth(double aRatio,
double aStart,
double anEnd)
Direction Both interpolation.
|
double |
interpolateOut(double aRatio,
double aStart,
double aEnd)
Direction Out interpolation.
|
boolean |
isShared()
Returns true if there's only a single shared instance of this interpolator.
|
java.lang.String |
toString()
Returns a string representation of this interpolator.
|
public static RMInterpolator LINEAR
public static RMInterpolator EASE_IN
public static RMInterpolator EASE_OUT
public static RMInterpolator EASE_BOTH
public static RMInterpolator EASE_IN_CUBIC
public static RMInterpolator EASE_OUT_CUBIC
public static RMInterpolator EASE_BOTH_CUBIC
public static RMInterpolator RANDOM
public static RMInterpolator BOUNCE
public static RMInterpolator ONE_SHOT
public RMInterpolator()
public RMInterpolator(RMInterpolator.Direction aDirection)
public static RMInterpolator getInterpolator(java.lang.String aName)
public static RMInterpolator getNewInterpolator(java.lang.String aName)
public RMInterpolator.Direction getDirection()
public double getValue(double aRatio)
public double getValue(double aRatio, double aStart, double anEnd)
public double getRatio(double aRatio)
public double interpolate(double aRatio, double aStart, double aEnd)
public double interpolateOut(double aRatio, double aStart, double aEnd)
public double interpolateBoth(double aRatio, double aStart, double anEnd)
public java.lang.String getName()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isShared()
public RMInterpolator clone()
clone
in class java.lang.Object
public static int getInterpolatorCount()
public static RMInterpolator getInterpolator(int anIndex)