SOIDLESENSOR(3iv)
π SoIdleSensor π
okay bestie, welcome to the SoIdleSensor(3IV) page β yes that's the manual name, section IV, and we're gonna get into it together π«Ά
β¨ NAME β¨
SoIdleSensor β a sensor for one-time only callbacks when the application is idle π€β¨
πΈ INHERITS FROM πΈ
SoSensor > SoDelayQueueSensor > SoIdleSensor
yep, it's giving three generations of sensor ancestry, the whole family tree is iconic π
π SYNOPSIS π
#include <Inventor/sensors/SoIdleSensor.h>
Methods from class SoIdleSensor:
SoIdleSensor()
SoIdleSensor(SoSensorCB *func, void *data)
~SoIdleSensor()
Methods from class SoDelayQueueSensor:
void setPriority(uint32_t pri)
uint32_t getPriority()
static uint32_t getDefaultPriority()
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 an idle sensor is almost exactly like an SoOneShotSensorβ¦ except bestie, there's a vibe check involved π. It only gets triggered when there are no timer queue sensors waiting to be triggered and there are no events waiting to be processed. Basically: only when everything is chill and idle. It's giving patient main character energy π€
Which means β and this is the important part β idle sensors will not be triggered if the delay queue is processed because the delay queue timeout expires. Like, that's not its moment, okay? π
But wait, plot twist π: if the delay queue timeout is disabled (see SoDB::setDelaySensorTimeout().), then idle and one-shot sensors are exactly the same. no cap, literally identical fr fr.
β οΈ Note that idle sensors do not reschedule themselves. In Inventor 1, idle sensors were always scheduled. So if you want that old behavior back, call schedule() in the callback function β that's how you duplicate it π
See the SoOneShotSensor manual page for more information π
π METHODS π
SoIdleSensor()SoIdleSensor(SoSensorCB *func, void *data)
Creation methods β¨ The second method 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 π«Ά
~SoIdleSensor()
Destroys the sensor, freeing up any memory associated with it after unscheduling it πβ‘οΈπ§Ή. it's the clean-exit queen, no memory leaks on her watch.
π¦ SEE ALSO π¦
SoOneShotSensor, SoDelayQueueSensor
go read those too, they're the supporting cast and they ate π
and that's the whole page bestie!! this was SoIdleSensor(3IV) β source/version slot on the footer is just chillin' empty, date slot too, so likeβ¦ timeless behavior honestly πβ¨ stay idle, stay iconic, 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