SoSensor(3)
π SoSensor π
okay so bestie, welcome to SoSensor(3) from the Coin manual, and let me tell you, this one is giving abstract base class energy β it's the blueprint for every single sensor in Coin. she's the mother of them all. periodt. π
β¨ NAME β¨
SoSensor β the SoSensor class is the abstract base class for all sensors. no cap, that's literally her whole job. π
πΈ SYNOPSIS πΈ
#include <Inventor/sensors/SoSensor.h>
Inherited by SoDelayQueueSensor, and SoTimerQueueSensor. yes bestie, she has children and they're all iconic in their own way π¦
π Public Member Functions
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
virtual void schedule (void)=0
virtual void unschedule (void)=0
virtual SbBool isScheduled (void) const =0
virtual void trigger (void)
virtual SbBool isBefore (const SoSensor *s) const =0
void setNextInQueue (SoSensor *next)
SoSensor * getNextInQueue (void) const
β Static Public Member Functions
static void initClass (void)
π Protected Attributes
SoSensorCB * func
void * funcData
π¦ Detailed Description π¦
The SoSensor class is the abstract base class for all sensors.
Sensors is a mechanism in Coin for scheduling jobs to be run upon specific events. The events in question could be particular points in time, or changes to entities in the scene graph. like, she's literally a lil scheduler goblin and she eats those events for breakfast π
See documentation of subclasses for insight into exactly for what types of events we can trigger sensor callbacks.
For most tasks where application programmers can use sensors, it is also possible to achieve the same results by using engines. There are a few important differences between sensors and engines, though:
- Engines are considered part of the scene graph, and are written to file upon SoWriteAction export operations. Sensors, on the other hand, are not included in export operations. so if you were hoping your sensor would show up in the file bestie... nope π
- Engines basically connects fields (and come with a lot of built-in functionality for combining and converting inputs and outputs), you just decide which engine you want, connect inputs and output and forget about it. Sensors are a lot more flexible in what you can do when they trigger, as control is transferred internally from Coin to your registered callback functions. highkey a whole different vibe π
π See also
SoSensorManager, SoEngine
π Constructor & Destructor Documentation π
π SoSensor::SoSensor (void )
Constructor. that's it, that's the whole description. she's mysterious like that π
π SoSensor::SoSensor (SoSensorCB * funcptr, void * data)
Constructor taking as parameters the sensor callback function func and the user data pointer which will be passed to the callback.
See also: setFunction(), setData()
π SoSensor::~SoSensor (void ) [virtual]
Destructor. say bye bestie π
π₯ Member Function Documentation π₯
β void SoSensor::setFunction (SoSensorCB * callbackfunction)
Set the callback function pointer which will be used when the sensor is triggered. she's getting her lil function glow-up β¨
See also: getFunction(), setData()
β SoSensorCB * SoSensor::getFunction (void ) const
Returns the callback function pointer. the way that she just hands it back to you, so generous π
See also: setFunction()
β void SoSensor::setData (void * callbackdata)
Set the user supplied data pointer which will be used as the first argument to the sensor callback function. yes, first, don't forget that fr fr
See also: getData(), setFunction()
β void * SoSensor::getData (void ) const
Returns the user supplied callback function data pointer.
See also: setData()
β virtual void SoSensor::schedule (void ) [pure virtual]
Put the sensor in a queue to be triggered at a later time. girl is getting in line, patiently, slay π«Ά
See also: unschedule(), isScheduled()
Implemented in SoAlarmSensor, SoDelayQueueSensor, SoTimerQueueSensor, and SoTimerSensor.
β virtual void SoSensor::unschedule (void ) [pure virtual]
Remove sensor from queue. The sensor will not be triggered unless it is later rescheduled. so like, if you just ghost her, she will not show up. important lore π
See also: schedule(), isScheduled()
Implemented in SoDelayQueueSensor, SoTimerQueueSensor, and SoTimerSensor.
β virtual SbBool SoSensor::isScheduled (void ) const [pure virtual]
Check if this sensor is scheduled for triggering. the vibe check function honestly π
See also: schedule(), unschedule()
Implemented in SoDelayQueueSensor, and SoTimerQueueSensor.
β void SoSensor::trigger (void ) [virtual]
Trigger the sensor's callback function. it's go time bestie π₯
Reimplemented in SoDataSensor, SoDelayQueueSensor, SoFieldSensor, and SoTimerQueueSensor.
β virtual SbBool SoSensor::isBefore (const SoSensor * s) const [pure virtual]
Returns TRUE if this sensor should precede sensor s in its sensor queue. cut the line? only if you're allowed to, bestie βοΈ
β void SoSensor::setNextInQueue (SoSensor * next)
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. so like... not for you bestie, sorry π
Open Inventor function not implemented in Coin.
β SoSensor * SoSensor::getNextInQueue (void ) const
This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. same energy, same warning π
Open Inventor function not implemented in Coin.
β void SoSensor::initClass (void ) [static]
Sets up initialization for static data for the sensors. Called by SoDB::init(). she gets dressed with a lil help from her friend π
π Member Data Documentation π
π SoSensorCB* SoSensor::func [protected]
Function to be called when a sensor triggers. the main character callback π
π void* SoSensor::funcData [protected]
Data passed to the callback function. the lil plus-one she brings along π«Ά
π Author π
Generated automatically by Doxygen for Coin from the source code. not me being robot-written, the lore is lore π
and that's the whole page bestie! mwah π this was Version 4.0.10, dated Thu Jun 25 2026 00:00:00, and it will forever live in the man page as SoSensor(3). go forth and schedule something iconic. π¦β¨π
π¦ where this page comes from
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 Β· BSD-3-Clause AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms