#include <ControlLinearNode.h>
Public Member Functions | |
ControlLinearNode (double aT=0.0, double aValue=0.0) | |
Default constructor. | |
ControlLinearNode (const ControlLinearNode &aNode) | |
Copy constructor. | |
virtual Object * | copy () const |
Construct and return a copy of this object. | |
virtual | ~ControlLinearNode () |
ControlLinearNode & | operator= (const ControlLinearNode &aControl) |
Assignment operator. | |
bool | operator== (const ControlLinearNode &aControl) const |
Equality operator. | |
bool | operator< (const ControlLinearNode &aControl) const |
Less than operator. | |
void | setTime (double aT) |
Set the tolerance for determining equality of nodes. | |
double | getTime () const |
Get the time at which this control node occurs. | |
void | setValue (double aValue) |
Set the value of this control node. | |
double | getValue () const |
Get the value of this control node. | |
char * | toString () |
Convert the node to a string representation. | |
Protected Attributes | |
PropertyDbl | _propT |
Equality tolerance. | |
PropertyDbl | _propValue |
Value of the node (may represent control value or min or max bounds, depending on which curve it's in). | |
double & | _t |
Reference to the value of the T property. | |
double & | _value |
Reference to the value of the X property. | |
Friends | |
std::ostream & | operator<< (std::ostream &aOut, const ControlLinearNode &aControlLinearNode) |
ControlLinearNode::ControlLinearNode | ( | double | aT = 0.0 , |
|
double | aValue = 0.0 | |||
) |
Default constructor.
aT | Time. | |
aX | Control value. | |
aMin | Minimum allowed control value. | |
aMax | Maximum allowed control value. |
ControlLinearNode::ControlLinearNode | ( | const ControlLinearNode & | aControl | ) |
Copy constructor.
aControl | Control to copy. |
ControlLinearNode::~ControlLinearNode | ( | ) | [virtual] |
Object * ControlLinearNode::copy | ( | ) | const [virtual] |
Construct and return a copy of this object.
The object is allocated using the new operator, so the caller is responsible for deleting the returned object.
Reimplemented from OpenSim::Object.
double ControlLinearNode::getTime | ( | ) | const |
Get the time at which this control node occurs.
double ControlLinearNode::getValue | ( | ) | const |
Get the value of this control node.
bool ControlLinearNode::operator< | ( | const ControlLinearNode & | aNode | ) | const [virtual] |
Less than operator.
aNode | Node with which to evaluate less than. |
Reimplemented from OpenSim::Object.
ControlLinearNode & ControlLinearNode::operator= | ( | const ControlLinearNode & | aNode | ) |
bool ControlLinearNode::operator== | ( | const ControlLinearNode & | aNode | ) | const [virtual] |
Equality operator.
Equality of nodes is dertermined by comparing the time member varaibles. If two nodes have the same value for time within the set equality tolerance, the two nodes are considered equal:
aNode | Node with which to evaluate equality. |
Reimplemented from OpenSim::Object.
void ControlLinearNode::setTime | ( | double | aTime | ) |
Set the tolerance for determining equality of nodes.
Equality of nodes is dertermined by comparing the time member varaibles. If two nodes have the same value for time within the set equality tolerance, the two nodes are considered equal.
Note that the member variable _EqualityTolerance and this method are static. So, the specified equality tolerance affects all nodes.
aTol | Equality tolerance. The equality tolerance must be 0.0 or positive. If a negative tolerance is sent in, the equality tolerance is set to 0.0. |
void ControlLinearNode:: SetEqualityTolerance(double aTol) { _EqualityTolerance = aTol; if(_EqualityTolerance<0.0) _EqualityTolerance = 0.0; } _____________________________________________________________________________ /** Get the tolerance for determining equality of nodes.
Equality of nodes is dertermined by comparing _time member varaibles. If two nodes have the same value for _time within the set equality tolerance, the two nodes are considered equal.
Note that the member variable _EqualityTolerance and this method are static. So, the specified equality tolerance affects all nodes.
double ControlLinearNode:: GetEqualityTolerance() { return(_EqualityTolerance); }
----------------------------------------------------------------------------- TIME ----------------------------------------------------------------------------- _____________________________________________________________________________ /** Set the time at which this control node occurs.
aTime | Time at which this control node occurs. |
void ControlLinearNode::setValue | ( | double | aValue | ) |
Set the value of this control node.
aValue | Value of this control node. |
char * ControlLinearNode::toString | ( | ) |
Convert the node to a string representation.
The caller is responsible for deleting the returned string.
std::ostream& operator<< | ( | std::ostream & | aOut, | |
const ControlLinearNode & | aControlLinearNode | |||
) | [friend] |
Reimplemented from OpenSim::Object.
PropertyDbl OpenSim::ControlLinearNode::_propT [protected] |
Equality tolerance.
Time at which the node occurs.
PropertyDbl OpenSim::ControlLinearNode::_propValue [protected] |
Value of the node (may represent control value or min or max bounds, depending on which curve it's in).
double& OpenSim::ControlLinearNode::_t [protected] |
Reference to the value of the T property.
double& OpenSim::ControlLinearNode::_value [protected] |
Reference to the value of the X property.