SoSensor(3)

πŸ“¦
version 4.0.10 Β· 4 versions
, in fedora 43, fedora 44

πŸ’– 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