SOALARMSENSOR(3iv)
β¨ SoAlarmSensor β¨
okay bestie, welcome to the SoAlarmSensor(3IV) page, it's giving very "set it and forget it" energy and I am obsessed π
πΈ NAME πΈ
SoAlarmSensor β triggers a callback once sometime in the future β°β¨
π¦ INHERITS FROM π¦
SoSensor > SoTimerQueueSensor > SoAlarmSensor
it's a whole family tree and this one is the baby at the bottom, periodt π
π SYNOPSIS π
#include <Inventor/sensors/SoAlarmSensor.h>
Methods from class SoAlarmSensor:
SoAlarmSensor()
SoAlarmSensor(SoSensorCB *func, void *data)
~SoAlarmSensor()
void setTime(const SbTime &absTime)
void setTimeFromNow(const SbTime &relTime)
const SbTime & getTime() const
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
π DESCRIPTION π
so like, this type of sensor is here to schedule a one-time callback for some time in the future π°οΈβ¨
and here's the tea: the sensor is not guaranteed to be called at exactly that time β it will be called sometime after the specified time. no cap, that's just how it is. so don't come for it if it's fashionably late π
π METHODS π
π Creation methods
SoAlarmSensor()
SoAlarmSensor(SoSensorCB *func, void *data)
Creation methods, slay β¨ the second one takes the callback function and data to be called when the sensor is triggered β so you hand it the function, you hand it the data, and it handles the rest π«Ά
π§ The destructor
~SoAlarmSensor()
Destroys the sensor, freeing up any memory associated with it after unscheduling it. very responsible, very demure, cleans up after itself π
β Setting the time
void setTime(const SbTime &absTime)β sets the sensor to go off at the specified time. heads up tho: you must also callschedule()for the sensor to be triggered. and if the sensor is already scheduled? it must be unscheduled and then rescheduled for the change in the trigger time to take effect. no shortcuts bestie πvoid setTimeFromNow(const SbTime &relTime)β sets the sensor to go off the given amount of time from now. same rules fr fr: you must also callschedule()for the sensor to be triggered, and if it's already scheduled, it must be unscheduled and then rescheduled for the change in the trigger time to take effect π¦const SbTime & getTime() constβ returns the time at which the sensor is set to be triggered. this one is similar to thegetTriggerTimemethod, but it returns the time even if the sensor has not yet been scheduled. iconic behavior honestly π
π SEE ALSO π
SoOneShotSensor, SoTimerSensor, SoTimerQueueSensor, SbTime
go read those too, iykyk π
ok that's the whole page bestie, you ate that π«Ά remember: schedule it or it does nothing, and it might show up a lil late but it will show up β¨
signing off from the SoAlarmSensor(3IV)() era β source/version and date live right there in that footer line, mwah ππ
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms