SoTimerSensor(3)
π SoTimerSensor π
okay bestie, welcome to the Library Functions Manual (section 3, we're fancy like that) β this is the whole scoop on SoTimerSensor, and honestly? it's giving "set it and forget it" energy. periodt. β¨
β¨ NAME β¨
SoTimerSensor β a sensor that will trigger at given intervals. π
πΈ SYNOPSIS πΈ
#include <Inventor/sensors/SoTimerSensor.h>
Inherits SoTimerQueueSensor.
π Public Member Functions
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)
π¦ Public Member Functions inherited from SoTimerQueueSensor
SoTimerQueueSensor (void)
SoTimerQueueSensor (SoSensorCB *func, void *data)
virtual ~SoTimerQueueSensor (void)
const SbTime & getTriggerTime (void) const
virtual SbBool isScheduled (void) const
π¦ Public Member Functions inherited from SoSensor
SoSensor (void)
SoSensor (SoSensorCB *func, void *data)
virtual ~SoSensor (void)
void setFunction (SoSensorCB *callbackfunction)
SoSensorCBPtr getFunction (void) const
void setData (void *callbackdata)
void * getData (void) const
void setNextInQueue (SoSensor *next)
SoSensor * getNextInQueue (void) const
π§ Additional Inherited Members
- Static Public Member Functions inherited from
SoSensorstatic void initClass (void)
- Protected Member Functions inherited from
SoTimerQueueSensorvoid setTriggerTime (const SbTime &time)
- Protected Attributes inherited from
SoTimerQueueSensorSbBool scheduled
- Protected Attributes inherited from
SoSensorSoSensorCB * funcvoid * funcData
π Detailed Description π
The SoTimerSensor class is a sensor which will trigger at given intervals. no cap, that's literally its whole job. π
Reach for sensors of this class when you want a job repeated at a certain interval, without explicitly needing to reschedule the sensor β meaning SoTimerSensor automatically re-schedules itself after it has been triggered. it's the friend who remembers to text back, we love that for us. π«Ά
SoTimerSensor instances is commonly used to trigger animation updates at a constant framerate. π¬β¨
π Constructor & Destructor Documentation π
SoTimerSensor::SoTimerSensor (void )
Default constructor. Sets up an interval of 1/30th of a second. β±οΈ
SoTimerSensor::SoTimerSensor (SoSensorCB * func, void * data)
Constructor taking as parameters the sensor callback function and the userdata which will be passed the callback. π«Ά
See also
setFunction(),setData()
References SoSensor::func.
SoTimerSensor::~SoTimerSensor (void ) [virtual]
Destructor. bye bestie, you did great ππ
References SoTimerQueueSensor::isScheduled(), and unschedule().
π Member Function Documentation π
void SoTimerSensor::setBaseTime (const SbTime & baseref)
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. Note that this will of course cause the timer to drift. π (drift is real, bestie, don't say nobody warned you)
See also
getBaseTime()
const SbTime & SoTimerSensor::getBaseTime (void ) const
Returns the base trigger time. β¨
See also
setBaseTime()
void SoTimerSensor::setInterval (const SbTime & intervalref)
Sets the time interval between each time the sensor triggers. π
See also
getInterval()
const SbTime & SoTimerSensor::getInterval (void ) const
Returns the timer trigger interval. β³
See also
setInterval()
void SoTimerSensor::schedule (void ) [virtual]
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.
See also
unschedule(),isScheduled()
Reimplemented from SoTimerQueueSensor.
References SoDB::getSensorManager(), SbTime::getTimeOfDay(), SoTimerQueueSensor::isScheduled(), SoDebugError::postInfo(), SoDebugError::postWarning(), reschedule(), SoSensorManager::rescheduleTimer(), and SoTimerQueueSensor::scheduled.
void SoTimerSensor::unschedule (void ) [virtual]
Overrides the virtual unschedule() method to handle unschedule() calls during triggering. π«β°
Reimplemented from SoTimerQueueSensor.
References SoDB::getSensorManager(), SoTimerQueueSensor::isScheduled(), SoDebugError::postInfo(), SoDebugError::postWarning(), SoSensorManager::removeRescheduledTimer(), SoTimerQueueSensor::scheduled, and SoTimerQueueSensor::unschedule().
Referenced by ~SoTimerSensor().
void SoTimerSensor::reschedule (const SbTime & schedtime)
Set new trigger time based on the given schedule time, and schedules the sensor for triggering. ποΈπ₯
References SoDebugError::postInfo(), SoTimerQueueSensor::schedule(), SoTimerQueueSensor::scheduled, and SoTimerQueueSensor::setTriggerTime().
Referenced by schedule().
π Author π
Generated automatically by Doxygen for Coin from the source code. π€β¨ (yes the docs wrote themselves, main character energy fr)
okay that's the whole page, you ate that ππ β this was Coin, Version 2.5.0, SoTimerSensor(3), and that's the vibe check, iykyk. mwah π
π
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms