Simbody  3.7
SimTK::TriggeredEventHandler Class Referenceabstract

TriggeredEventHandler is a subclass of EventHandler for events that occur when some condition is satisfied within the system. More...

+ Inheritance diagram for SimTK::TriggeredEventHandler:

Public Member Functions

 TriggeredEventHandler (const TriggeredEventHandler &clone)
 
TriggeredEventHandleroperator= (const TriggeredEventHandler &clone)
 
virtual ~TriggeredEventHandler ()
 
 TriggeredEventHandler (Stage requiredStage)
 Construct a new TriggeredEventHandler. More...
 
virtual Real getValue (const State &) const =0
 Get the value of the event trigger function for a State. More...
 
EventTriggerInfogetTriggerInfo ()
 Get an EventTriggerInfo object which can be used to customize when the event occurs. More...
 
Stage getRequiredStage () const
 Get the stage at which the trigger function will be evaluated. More...
 
- Public Member Functions inherited from SimTK::EventHandler
virtual ~EventHandler ()
 
virtual void handleEvent (State &state, Real accuracy, bool &shouldTerminate) const =0
 This method is invoked to handle the event. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TriggeredEventHandler() [1/2]

SimTK::TriggeredEventHandler::TriggeredEventHandler ( const TriggeredEventHandler clone)

◆ ~TriggeredEventHandler()

virtual SimTK::TriggeredEventHandler::~TriggeredEventHandler ( )
virtual

◆ TriggeredEventHandler() [2/2]

SimTK::TriggeredEventHandler::TriggeredEventHandler ( Stage  requiredStage)
explicit

Construct a new TriggeredEventHandler.

Parameters
requiredStage
The stage at which the trigger function will be evaluated.

Member Function Documentation

◆ operator=()

TriggeredEventHandler& SimTK::TriggeredEventHandler::operator= ( const TriggeredEventHandler clone)

◆ getValue()

virtual Real SimTK::TriggeredEventHandler::getValue ( const State ) const
pure virtual

Get the value of the event trigger function for a State.

Implemented in SimTK::GeodHitPlaneEvent.

◆ getTriggerInfo()

EventTriggerInfo& SimTK::TriggeredEventHandler::getTriggerInfo ( )

Get an EventTriggerInfo object which can be used to customize when the event occurs.

◆ getRequiredStage()

Stage SimTK::TriggeredEventHandler::getRequiredStage ( ) const

Get the stage at which the trigger function will be evaluated.


The documentation for this class was generated from the following file: