|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.yobotics.simulationconstructionset.YoVariable
com.yobotics.simulationconstructionset.DoubleYoVariable
com.yobotics.simulationconstructionset.util.math.filter.TwoVariableTransitionFilter
public class TwoVariableTransitionFilter
Title:
Description:
This class is used to have a varaible switch slowly between two inputs. When initialized with the startTransition method, the classes internal clock (Ti) is "reset" (Ti=0). V is the value of the varaible. The update method must be called every clock tick. At Ti=0, V=initialVariableValue. At Ti=transitionTime, V=finalVariableValue. For 0Company:
Field Summary |
---|
Fields inherited from class com.yobotics.simulationconstructionset.YoVariable |
---|
MAX_LENGTH_SHORT_NAME |
Constructor Summary | |
---|---|
TwoVariableTransitionFilter(java.lang.String name,
YoVariableRegistry registry,
DoubleYoVariable time)
|
Method Summary | |
---|---|
static void |
main(java.lang.String[] args)
|
void |
startTransition(double lengthOfTransitionTime)
|
void |
update(double initialVariableValue,
double finalVariableValue)
This method must be called every clock tick. |
Methods inherited from class com.yobotics.simulationconstructionset.DoubleYoVariable |
---|
add, add, getDoubleValue, getValueAsDouble, getValueString, getValueStringFromDouble, getYoVariableType, isNaN, mul, mul, set, setValueFromDouble, sub, sub, toString, valueEquals |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TwoVariableTransitionFilter(java.lang.String name, YoVariableRegistry registry, DoubleYoVariable time)
Method Detail |
---|
public void update(double initialVariableValue, double finalVariableValue)
initialVariableValue
- is the initial variable to be usedfinalVariableValue
- is the final variable to be usedpublic void startTransition(double lengthOfTransitionTime)
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |