.TH "SoTimerSensor" 3 "Thu May 29 2014" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoTimerSensor \- .PP The \fBSoTimerSensor\fP class is a sensor which will trigger at given intervals\&. .PP Use sensors of this class when you want a job repeated at a certain interval, without explicitly needing to reschedule the sensor (i\&.e\&. \fBSoTimerSensor\fP automatically re-schedules itself after it has been triggered)\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoTimerQueueSensor\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoTimerSensor\fP (void)" .br .ti -1c .RI "\fBSoTimerSensor\fP (\fBSoSensorCB\fP *\fBfunc\fP, void *data)" .br .ti -1c .RI "virtual \fB~SoTimerSensor\fP (void)" .br .ti -1c .RI "void \fBsetBaseTime\fP (const \fBSbTime\fP &base)" .br .ti -1c .RI "const \fBSbTime\fP & \fBgetBaseTime\fP (void) const " .br .ti -1c .RI "void \fBsetInterval\fP (const \fBSbTime\fP &interval)" .br .ti -1c .RI "const \fBSbTime\fP & \fBgetInterval\fP (void) const " .br .ti -1c .RI "virtual void \fBschedule\fP (void)" .br .ti -1c .RI "virtual void \fBunschedule\fP (void)" .br .ti -1c .RI "void \fBreschedule\fP (const \fBSbTime\fP &schedtime)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoTimerSensor\fP class is a sensor which will trigger at given intervals\&. .PP Use sensors of this class when you want a job repeated at a certain interval, without explicitly needing to reschedule the sensor (i\&.e\&. \fBSoTimerSensor\fP automatically re-schedules itself after it has been triggered)\&. \fBSoTimerSensor\fP instances is commonly used to trigger animation updates at a constant framerate\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoTimerSensor::SoTimerSensor (void)" Default constructor\&. Sets up an interval of 1/30th of a second\&. .SS "SoTimerSensor::SoTimerSensor (\fBSoSensorCB\fP *func, void *data)" Constructor taking as parameters the sensor callback function and the userdata which will be passed the callback\&. .PP \fBSee also:\fP .RS 4 \fBsetFunction()\fP, \fBsetData()\fP .RE .PP .SS "SoTimerSensor::~SoTimerSensor (void)\fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "void SoTimerSensor::setBaseTime (const \fBSbTime\fP &baseref)" Set the \fIbase\fP trigger time\&. .PP If you use this method, the trigger times will be on intervals from the given value\&. .PP 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\&. Note that this will of course cause the timer to drift\&. .PP \fBSee also:\fP .RS 4 \fBgetBaseTime()\fP .RE .PP .SS "const \fBSbTime\fP & SoTimerSensor::getBaseTime (void) const" Returns the base trigger time\&. .PP \fBSee also:\fP .RS 4 \fBsetBaseTime()\fP .RE .PP .SS "void SoTimerSensor::setInterval (const \fBSbTime\fP &intervalref)" Sets the time interval between each time the sensor triggers\&. .PP \fBSee also:\fP .RS 4 \fBgetInterval()\fP .RE .PP .SS "const \fBSbTime\fP & SoTimerSensor::getInterval (void) const" Returns the timer trigger interval\&. .PP \fBSee also:\fP .RS 4 \fBsetInterval()\fP .RE .PP .SS "void SoTimerSensor::schedule (void)\fC [virtual]\fP" Overrides the virtual \fBschedule()\fP method to be able to set up the base time, if this was not done by the user\&. .PP If no base time was set, base time will then equal the current time\&. .PP \fBSee also:\fP .RS 4 \fBunschedule()\fP, \fBisScheduled()\fP .RE .PP .PP Reimplemented from \fBSoTimerQueueSensor\fP\&. .SS "void SoTimerSensor::unschedule (void)\fC [virtual]\fP" Overrides the virtual \fBunschedule()\fP method to handle \fBunschedule()\fP calls during triggering\&. .PP Reimplemented from \fBSoTimerQueueSensor\fP\&. .SS "void SoTimerSensor::reschedule (const \fBSbTime\fP &schedtime)" Set new trigger time based on the given schedule time, and schedules the sensor for triggering\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.