Class RMInterpolator
java.lang.Object
com.inductiveautomation.rm.graphics.RMInterpolator
- All Implemented Interfaces:
- Cloneable
- Direct Known Subclasses:
- RMInterpolator.Bounce,- RMInterpolator.Periodic
This class provides functionality to interpolate between two numbers given a ratio between 0-1.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classParameterizable bounce interpolator class.static enumstatic classAn Interpolator subclass that can be used for periodic (ie looping) motion.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic RMInterpolatorBounce interpolator.static RMInterpolatorEase Both interpolator.static RMInterpolatorEase Both interpolator.static RMInterpolatorEase In interpolator.static RMInterpolatorEase In interpolator.static RMInterpolatorEase Out interpolator.static RMInterpolatorEase Out interpolator.static RMInterpolatorLinear interpolator.static RMInterpolatorOne Shot interpolator.static RMInterpolatorRandom interpolator.
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new interpolator.RMInterpolator(RMInterpolator.Direction aDirection) Creates a new interpolator with given direction.
- 
Method SummaryModifier and TypeMethodDescriptionclone()Standard clone implementation.Returns the interpolator direction.static RMInterpolatorgetInterpolator(int anIndex) Returns the individual common interpolator at given index.static RMInterpolatorgetInterpolator(String aName) Returns a shared interpolator for given name.static intReturns number of shared common interpolators.getName()Returns the name of this interpolator.static RMInterpolatorgetNewInterpolator(String aName) Returns a new interpolator instance for a given name.doublegetRatio(double aRatio) Returns a new ratio given normal ratio.doublegetValue(double aRatio) Returns an interpolated value for 0 & 1 given a ratio.doublegetValue(double aRatio, double aStart, double anEnd) Returns a value given a ratio and start/end values.doubleinterpolate(double aRatio, double aStart, double aEnd) Direction In interpolation.doubleinterpolateBoth(double aRatio, double aStart, double anEnd) Direction Both interpolation.doubleinterpolateOut(double aRatio, double aStart, double aEnd) Direction Out interpolation.booleanisShared()Returns true if there's only a single shared instance of this interpolator.toString()Returns a string representation of this interpolator.
- 
Field Details- 
LINEARLinear interpolator.
- 
EASE_INEase In interpolator.
- 
EASE_OUTEase Out interpolator.
- 
EASE_BOTHEase Both interpolator.
- 
EASE_IN_CUBICEase In interpolator.
- 
EASE_OUT_CUBICEase Out interpolator.
- 
EASE_BOTH_CUBICEase Both interpolator.
- 
RANDOMRandom interpolator. Object will get a random value at every frame, bounded by the start & end values.
- 
BOUNCEBounce interpolator.
- 
ONE_SHOTOne Shot interpolator.
 
- 
- 
Constructor Details- 
RMInterpolatorpublic RMInterpolator()Creates a new interpolator.
- 
RMInterpolatorCreates a new interpolator with given direction.
 
- 
- 
Method Details- 
getInterpolatorReturns a shared interpolator for given name.
- 
getNewInterpolatorReturns a new interpolator instance for a given name.
- 
getDirectionReturns the interpolator direction.
- 
getValuepublic double getValue(double aRatio) Returns an interpolated value for 0 & 1 given a ratio.
- 
getValuepublic double getValue(double aRatio, double aStart, double anEnd) Returns a value given a ratio and start/end values.
- 
getRatiopublic double getRatio(double aRatio) Returns a new ratio given normal ratio.
- 
interpolatepublic double interpolate(double aRatio, double aStart, double aEnd) Direction In interpolation.
- 
interpolateOutpublic double interpolateOut(double aRatio, double aStart, double aEnd) Direction Out interpolation.
- 
interpolateBothpublic double interpolateBoth(double aRatio, double aStart, double anEnd) Direction Both interpolation.
- 
getNameReturns the name of this interpolator.
- 
toStringReturns a string representation of this interpolator.
- 
cloneStandard clone implementation.
- 
getInterpolatorCountpublic static int getInterpolatorCount()Returns number of shared common interpolators.
- 
getInterpolatorReturns the individual common interpolator at given index.
 
-