Class RMInterpolator.Periodic
- java.lang.Object
-
- com.inductiveautomation.rm.graphics.RMInterpolator
-
- com.inductiveautomation.rm.graphics.RMInterpolator.Periodic
-
- All Implemented Interfaces:
java.lang.Cloneable
- Enclosing class:
- RMInterpolator
public static class RMInterpolator.Periodic extends 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 Classes Modifier and Type Class Description static class
RMInterpolator.Periodic.PeriodType
-
Nested 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 Constructor Description Periodic()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RMInterpolator.Periodic
clone()
Standard clone implementation.float
getFrequency()
java.lang.String
getName()
Override to return Periodic.RMInterpolator
getParent()
float
getPhase()
RMInterpolator.Periodic.PeriodType
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
setType(RMInterpolator.Periodic.PeriodType aType)
-
Methods inherited from class com.inductiveautomation.rm.graphics.RMInterpolator
getDirection, getInterpolator, getInterpolator, getInterpolatorCount, getNewInterpolator, getRatio, getValue, interpolate, interpolateBoth, interpolateOut, toString
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Override to return Periodic.- Overrides:
getName
in classRMInterpolator
-
isShared
public boolean isShared()
Returns false, since periodic interpolators have parameters.- Overrides:
isShared
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
public RMInterpolator getParent()
-
setParent
public void setParent(RMInterpolator aParent)
-
getPhase
public float getPhase()
-
setPhase
public void setPhase(float aPhase)
-
getType
public RMInterpolator.Periodic.PeriodType getType()
-
setType
public void setType(RMInterpolator.Periodic.PeriodType aType)
-
clone
public RMInterpolator.Periodic clone()
Description copied from class:RMInterpolator
Standard clone implementation.- Overrides:
clone
in classRMInterpolator
-
-