other versions
- wheezy-backports 3.1.4~abc9f50-3~bpo70+1
- jessie 3.1.4~abc9f50-7
SoTimerQueueSensor(3) | Coin | SoTimerQueueSensor(3) |
NAME¶
SoTimerQueueSensor - The SoTimerQueueSensor class is the abstract base class for sensors triggering on certain timer events. Timer sensors triggers upon specific points in time.SYNOPSIS¶
#include <Inventor/sensors/SoTimerQueueSensor.h> Inherits SoSensor. Inherited by SoAlarmSensor, and SoTimerSensor.Public Member Functions¶
SoTimerQueueSensor (void)
Protected Member Functions¶
void setTriggerTime (const SbTime &time)
Protected Attributes¶
SbBool scheduled
Additional Inherited Members¶
Detailed Description¶
The SoTimerQueueSensor class is the abstract base class for sensors triggering on certain timer events. Timer sensors triggers upon specific points in time.#include <Inventor/Xt/SoXt.h> #include <Inventor/sensors/SoTimerSensor.h> #include <stdio.h> static void timeSensorCallback(void * data, SoSensor * sensor) { SbTime time = SbTime::getTimeOfDay(); SbString string = time.format('%S.%i'); (void)printf('%s0, string.getString()); } int main(int argc, char ** argv) { SoXt::init('test'); SoTimerSensor * timeSensor = new SoTimerSensor; timeSensor->setFunction(timeSensorCallback); timeSensor->setBaseTime(SbTime::getTimeOfDay()); timeSensor->setInterval(1.0f); timeSensor->schedule(); SoXt::mainLoop(); return 0; }
Constructor & Destructor Documentation¶
SoTimerQueueSensor::SoTimerQueueSensor (void)¶
Default constructor.SoTimerQueueSensor::SoTimerQueueSensor (SoSensorCB *func, void *data)¶
Constructor taking as arguments the sensor callback function and the userdata which will be passed the callback. See Also:setFunction(), setData()
SoTimerQueueSensor::~SoTimerQueueSensor (void) [virtual]¶
Destructor.Member Function Documentation¶
const SbTime & SoTimerQueueSensor::getTriggerTime (void) const¶
Returns the time at which the sensor will trigger. See Also:setTriggerTime()
void SoTimerQueueSensor::schedule (void) [virtual]¶
Put the sensor in the global timer queue. See Also:unschedule(),
isScheduled()
void SoTimerQueueSensor::unschedule (void) [virtual]¶
Remove sensor from the timer queue, without triggering it first. See Also:schedule(), isScheduled()
SbBool SoTimerQueueSensor::isScheduled (void) const [virtual]¶
Check if this sensor is scheduled for triggering. See Also:schedule(), unschedule()
void SoTimerQueueSensor::trigger (void) [virtual]¶
Trigger the sensor's callback function. Reimplemented from SoSensor.void SoTimerQueueSensor::setTriggerTime (const SbTime &time) [protected]¶
Set absolute time at which to trigger sensor. See Also:getTriggerTime()
Member Data Documentation¶
SbBool SoTimerQueueSensor::scheduled [protected]¶
TRUE if the sensor is currently scheduled.Author¶
Generated automatically by Doxygen for Coin from the source code.Sat Oct 12 2013 | Version 4.0.0a |