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.float
getName()
Override to return Periodic.float
getPhase()
getType()
double
getValue
(double aRatio, double aStart, double anEnd) The main entry point.boolean
isShared()
Returns false, since periodic interpolators have parameters.void
setFrequency
(float aFrequency) void
setParent
(RMInterpolator aParent) void
setPhase
(float aPhase) void
Methods 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:
getName
in classRMInterpolator
-
getValue
public double getValue(double aRatio, double aStart, double anEnd) The main entry point.- Overrides:
getValue
in 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:RMInterpolator
Standard clone implementation.- Overrides:
clone
in classRMInterpolator
-