com.yobotics.simulationconstructionset.util.math.filter
Class TwoVariableTransitionFilter

java.lang.Object
  extended by com.yobotics.simulationconstructionset.YoVariable
      extended by com.yobotics.simulationconstructionset.DoubleYoVariable
          extended by com.yobotics.simulationconstructionset.util.math.filter.TwoVariableTransitionFilter
All Implemented Interfaces:
java.io.Serializable

public class TwoVariableTransitionFilter
extends DoubleYoVariable

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 0Copyright: Copyright (c) 2006

Company:

Version:
1.0
Author:
not attributable
See Also:
Serialized Form

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 com.yobotics.simulationconstructionset.YoVariable
addVariableChangedListener, fullNameEndsWithCaseInsensitive, getDescription, getFullNameWithNameSpace, getManualScalingMax, getManualScalingMin, getName, getName, getNameAndValueString, getNameAndValueStringFromDouble, getNameSpace, getNumericValueAsAString, getShortName, getVariableChangedListeners, getYoVariableRegistry, hasSameFullName, notifyVariableChangedListeners, removeAllVariableChangedListeners, removeVariableChangedListener, setManualScalingMinMax
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TwoVariableTransitionFilter

public TwoVariableTransitionFilter(java.lang.String name,
                                   YoVariableRegistry registry,
                                   DoubleYoVariable time)
Method Detail

update

public void update(double initialVariableValue,
                   double finalVariableValue)
This method must be called every clock tick.

Parameters:
initialVariableValue - is the initial variable to be used
finalVariableValue - is the final variable to be used

startTransition

public void startTransition(double lengthOfTransitionTime)

main

public static void main(java.lang.String[] args)