Class RMInterpolator.Periodic
java.lang.Object
com.inductiveautomation.rm.graphics.RMInterpolator
com.inductiveautomation.rm.graphics.RMInterpolator.Periodic
- All Implemented Interfaces:
Cloneable
- Enclosing class:
- RMInterpolator
An Interpolator subclass that can be used for periodic (ie looping) motion.
The different type values are (where n is the frequency):
LOOP : start -> end, n times, BACKANDFORTH - start -> end -> start, n times
SINUSOIDAL - start -> end -> start, n times along a smooth sin wave
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class com.inductiveautomation.rm.graphics.RMInterpolator
RMInterpolator.Bounce, RMInterpolator.Direction, RMInterpolator.Periodic -
Field Summary
Fields inherited from class com.inductiveautomation.rm.graphics.RMInterpolator
BOUNCE, EASE_BOTH, EASE_BOTH_CUBIC, EASE_IN, EASE_IN_CUBIC, EASE_OUT, EASE_OUT_CUBIC, LINEAR, ONE_SHOT, RANDOM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Standard clone implementation.floatgetName()Override to return Periodic.floatgetPhase()getType()doublegetValue(double aRatio, double aStart, double anEnd) The main entry point.booleanisShared()Returns false, since periodic interpolators have parameters.voidsetFrequency(float aFrequency) voidsetParent(RMInterpolator aParent) voidsetPhase(float aPhase) voidMethods inherited from class com.inductiveautomation.rm.graphics.RMInterpolator
getDirection, getInterpolator, getInterpolator, getInterpolatorCount, getNewInterpolator, getRatio, getValue, interpolate, interpolateBoth, interpolateOut, toString
-
Constructor Details
-
Periodic
public Periodic()
-
-
Method Details
-
getName
Override to return Periodic.- Overrides:
getNamein classRMInterpolator
-
getValue
public double getValue(double aRatio, double aStart, double anEnd) The main entry point.- Overrides:
getValuein classRMInterpolator
-
getFrequency
public float getFrequency() -
setFrequency
public void setFrequency(float aFrequency) -
getParent
-
setParent
-
getPhase
public float getPhase() -
setPhase
public void setPhase(float aPhase) -
getType
-
setType
-
clone
Description copied from class:RMInterpolatorStandard clone implementation.- Overrides:
clonein classRMInterpolator
-