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

Public Member Functions | |
| rdControlLinear (rdArray< rdControlLinearNode > *aX=NULL, const char *aName="UNKOWN") | |
| Default constructor. | |
| rdControlLinear (IDOM_Element *aElement) | |
| Construct a control from an XML Element. | |
| rdControlLinear (const rdControlLinear &aControl) | |
| Copy constructor. | |
| virtual | ~rdControlLinear () |
| Destructor. | |
| virtual rdControl * | copy () const |
| Construct a copy of this control. | |
| virtual rdControl * | copy (IDOM_Element *aElement) const |
| Copy this control and modify the copy so that it is consistent with a specified XML element node. | |
| rdControlLinear & | operator= (const rdControlLinear &aControl) |
| Assignment operator. | |
| void | setUseSteps (bool aTrueFalse) |
| Set whether or not step functions are used between control nodes or linear interpolation. | |
| bool | getUseSteps () const |
| Get whether or not step functions are used between control nodes or linear interpolation. | |
| virtual int | getNumParameters () const |
| Get the number of parameters that are used to specify the control curve. | |
| virtual void | setParameterMin (int aI, double aMin) |
| Set the minimum value of a control parameter. | |
| virtual double | getParameterMin (int aI) const |
| Get the minimum value of a control parameter. | |
| virtual void | setParameterMax (int aI, double aMax) |
| Set the maximum value of a control parameter. | |
| virtual double | getParameterMax (int aI) const |
| Get the maximum value of a control parameter. | |
| virtual double | getParameterTime (int aI) const |
| Get the time at which a parameter is specified. | |
| virtual void | getParameterNeighborhood (int aI, double &rTLower, double &rTUpper) const |
| Get the time neighborhood (i.e., the lower and upper bounds of time) in which a control parameter affects the value of the control curve. | |
| virtual int | getParameterList (double aT, rdArray< int > &rList) const |
| Get the list of parameters that affect the control curve at a specified time. | |
| virtual int | getParameterList (double aT1, double aT2, rdArray< int > &rList) const |
| Get the list of parameters that affect the control curve between two specified times and that do NOT affect the control curve below the lower of these two times. | |
| virtual void | setParameterValue (int aI, double aP) |
| Set the value of a control parameter. | |
| virtual double | getParameterValue (int aI) const |
| Get the value of a control parameter. | |
| virtual void | setControlValue (double aT, double aX) |
| Set the value of this control curve at time aT. | |
| virtual double | getControlValue (double aT) const |
| Get the value of this control at time aT. | |
| const rdArray< rdControlLinearNode > & | getNodeArray () const |
| Get the array of control nodes. | |
| 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 | PROP_USE_STEPS [] = "use_steps" |
| Property for whether or not to use steps rather than interpolate. | |
| const char | PROP_T [] = "time" |
| Property for time. | |
| const char | PROP_X [] = "value" |
| Property for value. | |
| const char | PROP_MIN [] = "min" |
| Property for minimum. | |
| const char | PROP_MAX [] = "max" |
| Property for maximum. | |
| const rdControlLinearNode | DEFAULT_NODE |
| Default control node. | |
Protected Attributes | |
| bool | _useSteps |
| Flag that indicates whether or not to linearly interpolate between nodes or use step functions. | |
| rdArray< rdControlLinearNode > | _nodes |
| Array of control nodes. | |
Private Member Functions | |
| void | setNull () |
| Set the member data to their NULL values. | |
| void | copyData (const rdControlLinear &aControl) |
| Copy the member variables of the specified control. | |
The curve is specified by an array of control nodes (see class rdControlLinearNode) that occur at monotonically increasing times. The value of the control curve is computed by linearly interpolating the values of the appropriate control nodes.
|
||||||||||||
|
Default constructor.
|
|
|
Construct a control from an XML Element.
|
|
|
Copy constructor.
|
|
|
Copy this control and modify the copy so that it is consistent with a specified XML element node. The copy is constructed by first using the contructor for the IDOM_Element in order to establish the relationship of the control with the XML node. Then, the assignment operator is used to set all member variables of the copy to the values of this object. Finally, the data members of the copy are updated from the IDOM_Elment using updateObject().
Implements rdControl. |
|
|
Generate an XML node representing this object.
Reimplemented from rdControl. |
|
|
Get the value of this control at time aT.
Implements rdControl. |
|
|
Get the array of control nodes.
|
|
|
Get the number of parameters that are used to specify the control curve.
Implements rdControl. |
|
||||||||||||||||
|
Get the list of parameters that affect the control curve between two specified times and that do NOT affect the control curve below the lower of these two times. This method is useful when solving for a set of controls for a dynamic simulation. When solving for a set of controls, one always wants to go forward in time. Therefore, one does not want to change control parameters that affect the control curve at past times. A control parameter is included in the list only if it affects the control curve in the specified time interval AND does NOT affect the control curve below the lower bound of the specified time interval. So, it is possible that some of the parameters on the returned list could affect the control curve at times greater than the upper bound of the specified time interval.
Implements rdControl. |
|
||||||||||||
|
Get the list of parameters that affect the control curve at a specified time.
Implements rdControl. |
|
|
Get the maximum value of a control parameter.
Implements rdControl. |
|
|
Get the minimum value of a control parameter.
Implements rdControl. |
|
||||||||||||||||
|
Get the time neighborhood (i.e., the lower and upper bounds of time) in which a control parameter affects the value of the control curve. Changes in the specified parameter are guarranteed not to change the value of the control curve below the lower bound time or above the upper bound time. If a parameter influences the value of the control curve for all times, rdMath::MINUS_INFINITY and rdMath::PLUS_INFINITY are returned for the upper and lower bound times, respectively.
Implements rdControl. |
|
|
Get the time at which a parameter is specified. Parameters for some types of control curves do not have a time at which they are specified. For example, in a Fourier series the control parameters are the cooefficients in the expansion, and each term in the expansion corresponds not to a specific time but to a frequency. Another example is a constant that has the same value for all times. In these cases, this method returns rdMath::NAN.
Implements rdControl. |
|
|
Get the value of a control parameter.
Implements rdControl. |
|
|
Get whether or not step functions are used between control nodes or linear interpolation. When step functions are used, the value of the control curve between two nodes is the value of the node that occurs later in time.
|
|
|
Assignment operator.
|
|
||||||||||||
|
Set the value of this control curve at time aT. This method adds a set of control parameters at the specified time unless the specified time equals the time of an existing control node, in which case the parameters of that control node are changed.
Implements rdControl. |
|
||||||||||||
|
Set the maximum value of a control parameter.
Implements rdControl. |
|
||||||||||||
|
Set the minimum value of a control parameter.
Implements rdControl. |
|
||||||||||||
|
Set the value of a control parameter.
Implements rdControl. |
|
|
Set whether or not step functions are used between control nodes or linear interpolation. When step functions are used, the value of the control curve between two nodes is the value of the node that occurs later in time.
|
|
|
Update the member data of this object based on its XML node. Member objects (children) are not updated. Reimplemented from rdControl. |
|
|
Update the XML node representing this object.
Reimplemented from rdControl. |
|
|
Update this object based on its XML node.
Reimplemented from rdControl. |
1.3