Simbody  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimTK::PeriodicEventReporter Class Reference

PeriodicEventReporter is a subclass of ScheduledEventReporter which generates a series of uniformly spaced events at regular intervals. More...

#include <EventReporter.h>

+ Inheritance diagram for SimTK::PeriodicEventReporter:

Public Member Functions

 ~PeriodicEventReporter ()
 
Real getNextEventTime (const State &state, bool includeCurrentTime) const
 Get the next time at which an event will occur. More...
 
 PeriodicEventReporter (Real eventInterval)
 Create a PeriodicEventReporter. 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::ScheduledEventReporter
virtual ~ScheduledEventReporter ()
 
- Public Member Functions inherited from SimTK::EventReporter
virtual ~EventReporter ()
 
virtual void handleEvent (const State &state) const =0
 This method is invoked to handle the event. More...
 

Detailed Description

PeriodicEventReporter is a subclass of ScheduledEventReporter which generates a series of uniformly spaced events at regular intervals.

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

Constructor & Destructor Documentation

SimTK::PeriodicEventReporter::~PeriodicEventReporter ( )
SimTK::PeriodicEventReporter::PeriodicEventReporter ( Real  eventInterval)

Create a PeriodicEventReporter.

Parameters
eventIntervalthe time interval at which events should occur.

Member Function Documentation

Real SimTK::PeriodicEventReporter::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::ScheduledEventReporter.

Real SimTK::PeriodicEventReporter::getEventInterval ( ) const

Get the time interval at which events occur.

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

Set the time interval at which events occur.


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