An abstract class defining an OpenSim UnilateralConstraint. More...
#include <UnilateralConstraint.h>
Public Member Functions | |
UnilateralConstraint () | |
Default constructor. | |
UnilateralConstraint (const UnilateralConstraint &aUnilateralConstraint) | |
Copy constructor. | |
virtual | ~UnilateralConstraint () |
Destructor. | |
virtual Object * | copy () const =0 |
Construct and return a copy of this object. | |
UnilateralConstraint & | operator= (const UnilateralConstraint &aUnilateralConstraint) |
Assignment operator. | |
void | copyData (const UnilateralConstraint &aUnilateralConstraint) |
Copy data members from one UnilateralConstraint to another. | |
OPENSIM_DECLARE_DERIVED (UnilateralConstraint, Constraint) | |
virtual int | getNumConstraintEquations () |
virtual std::vector< bool > | unilateralConditionsSatisfied (const SimTK::State &s) |
Protected Member Functions | |
virtual void | setup (Model &aModel) |
Perform some set up functions that happen after the object has been deserialized or copied. | |
Protected Attributes | |
int | _numConstraintEquations |
number of constraint equations and thus unilateral conditions to be satisfied |
An abstract class defining an OpenSim UnilateralConstraint.
Specific UnilateralConstraints should be derived from this class.
It is expeced that constraints used to model contact will be unilateral. Furthermore, complex contact constraints can themselves employ several SimTK::Constraints. In this case, disabling methods on Constraint should be overriden and the appropriate logic applied to enabling/disabling individual underlying constraints. In most cases, the unilateral conditions should be sufficient to determine the states of the internal (underlying) constraints based on the global disabled condition.
UnilateralConstraint::UnilateralConstraint | ( | ) |
Default constructor.
UnilateralConstraint::UnilateralConstraint | ( | const UnilateralConstraint & | aUnilateralConstraint | ) |
Copy constructor.
aUnilateralConstraint | UnilateralConstraint to be copied. |
UnilateralConstraint::~UnilateralConstraint | ( | ) | [virtual] |
Destructor.
virtual Object* OpenSim::UnilateralConstraint::copy | ( | ) | const [pure 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.
Implements OpenSim::Constraint.
Implemented in OpenSim::RollingOnSurfaceConstraint.
void UnilateralConstraint::copyData | ( | const UnilateralConstraint & | aUnilateralConstraint | ) |
Copy data members from one UnilateralConstraint to another.
aUnilateralConstraint | UnilateralConstraint to be copied. |
Reimplemented from OpenSim::Constraint.
Reimplemented in OpenSim::RollingOnSurfaceConstraint.
virtual int OpenSim::UnilateralConstraint::getNumConstraintEquations | ( | ) | [inline, virtual] |
OpenSim::UnilateralConstraint::OPENSIM_DECLARE_DERIVED | ( | UnilateralConstraint | , | |
Constraint | ||||
) |
UnilateralConstraint & UnilateralConstraint::operator= | ( | const UnilateralConstraint & | aConstraint | ) |
Assignment operator.
Reimplemented from OpenSim::Constraint.
Reimplemented in OpenSim::RollingOnSurfaceConstraint.
void UnilateralConstraint::setup | ( | Model & | aModel | ) | [protected, virtual] |
Perform some set up functions that happen after the object has been deserialized or copied.
Model | containing this UnilateralConstraint. |
Reimplemented from OpenSim::Constraint.
Reimplemented in OpenSim::RollingOnSurfaceConstraint.
virtual std::vector<bool> OpenSim::UnilateralConstraint::unilateralConditionsSatisfied | ( | const SimTK::State & | s | ) | [inline, virtual] |
Reimplemented in OpenSim::RollingOnSurfaceConstraint.
int OpenSim::UnilateralConstraint::_numConstraintEquations [protected] |
number of constraint equations and thus unilateral conditions to be satisfied