Simbody  3.5
SimTK::PeriodicEventHandler Class Reference

PeriodicEventHandler is a subclass of ScheduledEventHandler which generates a series of uniformly spaced events at regular intervals. More...

+ Inheritance diagram for SimTK::PeriodicEventHandler:

Public Member Functions

 ~PeriodicEventHandler ()
 
Real getNextEventTime (const State &state, bool includeCurrentTime) const
 Get the next time at which an event will occur. More...
 
 PeriodicEventHandler (Real eventInterval)
 Create a PeriodicEventHandler. More...
 
Real getEventInterval () const
 Get the time interval at which events occur. More...
 
void setEventInterval (Real eventInterval)
 Set the time interval at which events occur. More...
 
- Public Member Functions inherited from SimTK::ScheduledEventHandler
virtual ~ScheduledEventHandler ()
 
- 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

PeriodicEventHandler is a subclass of ScheduledEventHandler which generates a series of uniformly spaced events at regular intervals.

This allows you to very easily create event handlers with this behavior.

Constructor & Destructor Documentation

SimTK::PeriodicEventHandler::~PeriodicEventHandler ( )
SimTK::PeriodicEventHandler::PeriodicEventHandler ( Real  eventInterval)

Create a PeriodicEventHandler.

Parameters
eventIntervalThe time interval at which events should occur.

Member Function Documentation

Real SimTK::PeriodicEventHandler::getNextEventTime ( const State state,
bool  includeCurrentTime 
) const
virtual

Get the next time at which an event will occur.

Parameters
statethe current state of the system
includeCurrentTimeif true, return the next event whose time is >= the current time. If false, only return events after (not at) the current time.

Implements SimTK::ScheduledEventHandler.

Real SimTK::PeriodicEventHandler::getEventInterval ( ) const

Get the time interval at which events occur.

void SimTK::PeriodicEventHandler::setEventInterval ( Real  eventInterval)

Set the time interval at which events occur.


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