#include <rdControl.h>
Inheritance diagram for rdControl:

Public Member Functions | |
| rdControl (const char *aName="UNKOWN") | |
| Default constructor. | |
| rdControl (IDOM_Element *aElement) | |
| Construct a control from an XML Element. | |
| rdControl (const rdControl &aControl) | |
| Copy constructor. | |
| virtual | ~rdControl () |
| Destructor. | |
| virtual rdControl * | copy () const=0 |
| virtual rdControl * | copy (IDOM_Element *aElement) const=0 |
| rdControl & | operator= (const rdControl &aControl) |
| Assignment operator. | |
| void | setIsModelControl (bool aTrueFalse) |
| Set whether or not this control is a model control. | |
| bool | getIsModelControl () const |
| Get whether or not this control is a model control. | |
| virtual int | getNumParameters () const=0 |
| void | setDefaultParameterMin (double aMin) |
| Set the default minimum value of a control parameter. | |
| double | getDefaultParameterMin () const |
| Get the default minimum value of a control parameter. | |
| void | setDefaultParameterMax (double aMin) |
| Set the default maximum value of a control parameter. | |
| double | getDefaultParameterMax () const |
| Get the default maximum value of a control parameter. | |
| virtual void | setParameterMin (int aI, double aMin)=0 |
| virtual double | getParameterMin (int aI) const=0 |
| virtual void | setParameterMax (int aI, double aMax)=0 |
| virtual double | getParameterMax (int aI) const=0 |
| virtual double | getParameterTime (int aI) const=0 |
| virtual void | getParameterNeighborhood (int aI, double &rTLower, double &rTUpper) const=0 |
| virtual int | getParameterList (double aT, rdArray< int > &rList) const=0 |
| virtual int | getParameterList (double aTLower, double aTUpper, rdArray< int > &rList) const=0 |
| virtual double | getParameterValue (int aI) const=0 |
| virtual void | setParameterValue (int aI, double aP)=0 |
| virtual double | getControlValue (double aT=0.0) const=0 |
| virtual void | setControlValue (double aT, double aX)=0 |
| virtual void | updateObject (bool aDeep=true) |
| Update this object based on its XML node. | |
| void | updateData () |
| Update the member data of this object based on its XML node. | |
| virtual void | updateNode (bool aDeep=true) |
| Update the XML node representing this object. | |
| virtual void | generateNode (IDOM_Element *aParent) |
| Generate an XML node representing this object. | |
Static Public Attributes | |
| const char | DEFAULT_NAME [] = "default" |
| const char | PROP_IS_MODEL_CONTROL [] = "is_model_control" |
| const char | PROP_DEFAULT_MIN [] = "default_minimum" |
| const char | PROP_DEFAULT_MAX [] = "default_maximum" |
Protected Attributes | |
| bool | _isModelControl |
| Flag that specifies whether or not this control is a model control. | |
| double | _defaultMin |
| Default parameter minimum. | |
| double | _defaultMax |
| Default parameter maximum. | |
Private Member Functions | |
| void | setNull () |
| Set the member variables to their NULL values. | |
| void | copyData (const rdControl &aControl) |
| Copy the member variables of the specified control. | |
This class is intended to be the base class for different types of controls, so many of its methods are virtual.
In general, a control consists of a set of parameters. These parameters are used to reconstruct a control curve. For example, a control may be represented by a consant, a series of step functions, a set of linearly interpolated values, a set of spline control points, coefficients in a Fourier series, etc.
Because there is not necessarily a 1-to-1 correspondence between the parameters used to represent a control curve and the value of the control curve, there are two basic ways to access the content of a control: getParameter() gets the value of a parameter, and getValue() gets the value at a particular time.
A distinction is also made between controls that control a model and controls that control some other aspect of a simulation. For example, a control for the excitation level of a muscle is a "model" control. The value of this type of control is querried during the course of a simualtion. On the other hand, a control for the final time of a simulation is not usually a "model" control. Nor is a control for the initial value of a state variable, even if that state variable is the initial value of a muscle activation. These "non-model" controls are used to set things before a simulation ever begins and are not querried during the cours of a simulation. The number of model controls can be querried by a call to rdModel::getNX().
|
|
Construct a control from an XML Element.
|
|
|
Copy constructor.
|
|
|
Generate an XML node representing this object.
Reimplemented from rdObject. Reimplemented in rdControlConstant, and rdControlLinear. |
|
|
Get the default maximum value of a control parameter. The default maximum is used when no maximum value is specified.
|
|
|
Get the default minimum value of a control parameter. The default minimum is used when no minimum value is specified.
|
|
|
Get whether or not this control is a model control. A model control is a control that is expected by a model. The number of model controls is returned by a call to rdModel::getNX(). Controls that are not model controls may be, for example, controls that are used to set up a simulation. Such examples might include an initial state of a model (e.g., joint angle, joint angular velocity, ...) or the final time of a siimulation.
|
|
|
Assignment operator.
|
|
|
Set the default maximum value of a control parameter. The default maximum is used when no maximum value is specified.
|
|
|
Set the default minimum value of a control parameter. The default minimum is used when no minimum value is specified.
|
|
|
Set whether or not this control is a model control. A model control is a control that is expected by a model. The number of model controls is returned by a call to rdModel::getNX(). Controls that are not model controls may be, for example, controls that are used to set up a simulation. Such examples might include an initial state of a model (e.g., joint angle, joint angular velocity, ...) or the final time of a siimulation.
|
|
|
Update the member data of this object based on its XML node. Member objects (children) are not updated. Reimplemented in rdControlConstant, and rdControlLinear. |
|
|
Update the XML node representing this object.
Reimplemented from rdObject. Reimplemented in rdControlConstant, and rdControlLinear. |
|
|
Update this object based on its XML node.
Reimplemented from rdObject. Reimplemented in rdControlConstant, and rdControlLinear. |
1.3