#include <Inventor/sensors/SoTimerSensor.h>
Inheritance diagram for SoTimerSensor::
Public Methods | |
SoTimerSensor (void) | |
SoTimerSensor (SoSensorCB *func, void *data) | |
virtual | ~SoTimerSensor (void) |
void | setBaseTime (const SbTime &base) |
const SbTime & | getBaseTime (void) const |
void | setInterval (const SbTime &interval) |
const SbTime & | getInterval (void) const |
virtual void | schedule (void) |
virtual void | unschedule (void) |
void | reschedule (const SbTime &schedtime) |
Use sensors of this class when you want a job repeated at a certain interval, without explicitly needing to reschedule the sensor (i.e. SoTimerSensor automatically re-schedules itself after it has been triggered).
SoTimerSensor instances is commonly used to trigger animation updates at a constant framerate.
|
Default constructor. Sets up an interval of 1/30th of a second. |
|
Constructor taking as parameters the sensor callback function and the userdata which will be passed the callback.
|
|
Destructor. |
|
Set the base trigger time. If you use this method, the trigger times will be on intervals from the given value. Without an explicitly set base time, the next trigger invocation after a trigger has happened will be on the current time plus the interval time.
|
|
Returns the base trigger time.
|
|
Sets the time interval between each time the sensor triggers.
|
|
Returns the timer trigger interval.
|
|
Overrides the virtual schedule() method to be able to set up the base time, if this was not done by the user. If no base time was set, base time will then equal the current time.
Reimplemented from SoTimerQueueSensor. |
|
Overrides the virtual unschedule() method to handle unschedule() calls during triggering. Reimplemented from SoTimerQueueSensor. |
|
Set new trigger time based on the given schedule time, and schedules the sensor for triggering. |