|
||||||||||
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
public class DoubleYoVariable
Title: Yobotics! Simulation Construction Set
Description: Package for Simulating Dynamic Robots and Mechanisms
YoVariables provide a simple, convenient mechanism for storing and manipulating robot data. While each essentially contains a double value YoVariables are designed for integration into the SCS GUI. Once registered, a variable will automatically become available to the GUI for graphing, modification and other data manipulation. Historical values of all registered YoVariables are stored in the DataBuffer which may be exported for later use.
Field Summary |
---|
Fields inherited from class com.yobotics.simulationconstructionset.YoVariable |
---|
MAX_LENGTH_SHORT_NAME |
Constructor Summary | |
---|---|
DoubleYoVariable(java.lang.String name,
java.lang.String description,
YoVariableRegistry registry)
Creates a new YoVariable with the given name and adds it to the specified registry. |
|
DoubleYoVariable(java.lang.String name,
java.lang.String description,
YoVariableRegistry registry,
double minScaling,
double maxScaling)
Creates a new YoVariable with the given name and adds it to the specified registry. |
|
DoubleYoVariable(java.lang.String name,
YoVariableRegistry registry)
Creates a new YoVariable with the given name and adds it to the specified registry. |
Method Summary | |
---|---|
void |
add(double value)
|
void |
add(DoubleYoVariable variable)
|
double |
getDoubleValue()
Retrieve the double value of this variable, if not of double type a warning will be printed. |
double |
getValueAsDouble()
|
void |
getValueString(java.lang.StringBuffer stringBuffer)
Appends the value of this variable to the end of the given StringBuffer. |
void |
getValueStringFromDouble(java.lang.StringBuffer stringBuffer,
double doubleValue)
|
YoVariableType |
getYoVariableType()
|
boolean |
isNaN()
|
void |
mul(double value)
|
void |
mul(DoubleYoVariable value)
|
void |
set(double value)
Set the value of this YoVariable. |
void |
setValueFromDouble(double value)
|
void |
sub(double value)
|
void |
sub(DoubleYoVariable variable)
|
java.lang.String |
toString()
Retrieves a string representation of this variable. |
boolean |
valueEquals(double value)
Check if the value contained by this variable is equal to the given double. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DoubleYoVariable(java.lang.String name, YoVariableRegistry registry)
name
- name to be used for all references of this variable by SCSregistry
- YoVariableRegistry with which this variable is to be registerdYoVariableRegistry
public DoubleYoVariable(java.lang.String name, java.lang.String description, YoVariableRegistry registry)
name
- name to be used for all references of this variable by SCSdescription
- A short description of this variableregistry
- YoVariableRegistry with which this variable is to be registeredYoVariableRegistry
public DoubleYoVariable(java.lang.String name, java.lang.String description, YoVariableRegistry registry, double minScaling, double maxScaling)
name
- name to be used for all references of this variable by SCSdescription
- A short description of this variableregistry
- YoVariableRegistry with which this variable is to be registeredminScaling
- minimum value for scaling purposesmaxScaling
- maximum value for scaling purpousesYoVariableRegistry
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isNaN()
public void add(DoubleYoVariable variable)
public void sub(DoubleYoVariable variable)
public void sub(double value)
public void add(double value)
public void mul(double value)
public void mul(DoubleYoVariable value)
public boolean valueEquals(double value)
value
- double to be compared
public double getDoubleValue()
public void set(double value)
value
- double value to storepublic void getValueString(java.lang.StringBuffer stringBuffer)
getValueString
in class YoVariable
stringBuffer
- StringBuffer to which the value will be appendedpublic void getValueStringFromDouble(java.lang.StringBuffer stringBuffer, double doubleValue)
getValueStringFromDouble
in class YoVariable
public double getValueAsDouble()
getValueAsDouble
in class YoVariable
public void setValueFromDouble(double value)
setValueFromDouble
in class YoVariable
public YoVariableType getYoVariableType()
getYoVariableType
in class YoVariable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |