SOTIMERQUEUESENSOR(3iv)

πŸ’– NAME πŸ’–

SoTimerQueueSensor β€” it's an abstract base class for sensors dependent on time. And yes bestie, you're reading the SoTimerQueueSensor(3IV) manual page, no cap. πŸ•°οΈβœ¨


🌈 INHERITS FROM 🌈

SoSensor > SoTimerQueueSensor β€” the family tree is giving legacy, honestly. πŸ‘‘


✨ SYNOPSIS ✨

#include <Inventor/sensors/SoTimerQueueSensor.h>
Methods from class SoTimerQueueSensor:

     const SbTime &      getTriggerTime()
     virtual void        schedule()
     virtual void        unschedule()
     virtual SbBool      isScheduled()

Methods from class SoSensor:

     void                setFunction(SoSensorCB *callbackFunction)
     SoSensorCB *        getFunction() const
     void                setData(void *callbackData)
     void *              getData() const

That's the whole vibe right there. πŸ’…


πŸ“– DESCRIPTION πŸ“–

Timer queue sensors are sensors that trigger themselves at specific times. The timer queue is normally processed as part of a program's main loop when the program is not busy doing something else. Note that processing the timer queue is not asynchronous β€” the program must re-enter its main loop for timers to be triggered. When the timer queue is processed, all timers scheduled to go off at or before the current time are triggered once, in order from earliest to latest. It's giving very "wait your turn, bestie" energy. 🫢

Lowkey important: not async. If you're out here thinking timers just fire in the background, that's not the vibe. The program has to loop back around. 😭

πŸ› οΈ METHODS πŸ› οΈ

  • const SbTime & getTriggerTime() β€” returns the time at which this sensor is scheduled to be triggered. If the sensor is not scheduled, the results are undefined, so don't even play with that, fr fr. 🫣
  • virtual void schedule() β€” adds this sensor to the timer queue. Subclasses provide methods for setting when the sensor will be triggered. ✨
  • virtual void unschedule() β€” if this sensor is scheduled, removes it from the timer queue so that it will not be triggered. Bye bestie, you're off the list. πŸ’…
  • virtual SbBool isScheduled() β€” returns TRUE if this sensor has been scheduled and is waiting in the timer queue to be triggered. It's literally checking if you're still in line. πŸ‘‘

πŸ‘€ SEE ALSO πŸ‘€

  • SoTimerSensor
  • SoAlarmSensor
  • SoIdleSensor
  • SoOneShotSensor
  • SoDataSensor

Go read those too, they're all part of the squad. 🌸


Okay that's the whole page, bestie. This was SoTimerQueueSensor(3IV) β€” that's the manual name, and the footer said SoTimerQueueSensor(3IV)() so you know the source/version vibe. No date on this one, just the title and the tea. Stay scheduled, stay iconic. πŸŽ€πŸ’–βœ¨