Simbody
|
TriggeredEventHandler is a subclass of EventHandler for events that occur when some condition is satisfied within the system. More...
#include <EventHandler.h>
Public Member Functions | |
TriggeredEventHandler (const TriggeredEventHandler &clone) | |
TriggeredEventHandler & | operator= (const TriggeredEventHandler &clone) |
virtual | ~TriggeredEventHandler () |
TriggeredEventHandler (Stage requiredStage) | |
Construct a new TriggeredEventHandler. | |
virtual Real | getValue (const State &) const =0 |
Get the value of the event trigger function for a State. | |
EventTriggerInfo & | getTriggerInfo () |
Get an EventTriggerInfo object which can be used to customize when the event occurs. | |
Stage | getRequiredStage () const |
Get the stage at which the trigger function will be evaluated. |
TriggeredEventHandler is a subclass of EventHandler for events that occur when some condition is satisfied within the system.
This is implemented by means of an "event trigger function". For any State, the handler must be able to calculate the value of the function. When it passes through 0, that indicates the event has occurred. You can also customize when the event is triggered, for example to specify that it is only triggered when the function goes from negative to positive, not when it goes from positive to negative.
SimTK::TriggeredEventHandler::TriggeredEventHandler | ( | const TriggeredEventHandler & | clone | ) |
virtual SimTK::TriggeredEventHandler::~TriggeredEventHandler | ( | ) | [virtual] |
SimTK::TriggeredEventHandler::TriggeredEventHandler | ( | Stage | requiredStage | ) |
Construct a new TriggeredEventHandler.
requiredStage | the stage at which the trigger function will be evaluated |
TriggeredEventHandler& SimTK::TriggeredEventHandler::operator= | ( | const TriggeredEventHandler & | clone | ) |
virtual Real SimTK::TriggeredEventHandler::getValue | ( | const State & | ) | const [pure virtual] |
Get the value of the event trigger function for a State.
EventTriggerInfo& SimTK::TriggeredEventHandler::getTriggerInfo | ( | ) |
Get an EventTriggerInfo object which can be used to customize when the event occurs.
Stage SimTK::TriggeredEventHandler::getRequiredStage | ( | ) | const |
Get the stage at which the trigger function will be evaluated.