SoSensor(3)
π SoSensor(3) π
Library Functions Manual β¨ welcome to the SoSensor(3) page bestie, buckle up π
πΈ NAME πΈ
SoSensor β the abstract base class for all the sensors. every single one. she's the blueprint, the blueprint-iest π
β¨ SYNOPSIS β¨
#include <Inventor/sensors/SoSensor.h>
Inherited by SoDelayQueueSensor, and SoTimerQueueSensor. (yes queen, she's the mom of the whole sensor family tree π³)
π«Ά Public Member Functions π«Ά
SoSensor (void)SoSensor (SoSensorCB *func, void *data)virtual ~SoSensor (void)void setFunction (SoSensorCB *callbackfunction)SoSensorCBPtr getFunction (void) constvoid setData (void *callbackdata)void * getData (void) constvirtual void schedule (void)=0virtual void unschedule (void)=0virtual SbBool isScheduled (void) const =0virtual void trigger (void)virtual SbBool isBefore (const SoSensor *s) const =0void setNextInQueue (SoSensor *next)SoSensor * getNextInQueue (void) const
π Static Public Member Functions π
static void initClass (void)
π Protected Attributes π
SoSensorCB * funcvoid * funcData
π¦ Detailed Description π¦
okay so. the SoSensor class is the abstract base class for all sensors. that's the whole vibe, she's the origin story π«Ά
Sensors are a mechanism in Coin for scheduling jobs to be run upon specific events. and what events, you ask? the events in question could be particular points in time β°, or changes to entities in the scene graph π. literally either one, she contains multitudes.
see documentation of subclasses for insight into exactly for what types of events we can trigger sensor callbacks π (iykyk).
For most tasks where application programmers can use sensors, it is also possible to achieve the same results by using engines. but bestie, there are a few important differences between sensors and engines, so listen up:
- Engines are considered part of the scene graph, and is written to file upon
SoWriteActionexport operations. Sensors, on the other hand, are not included in export operations. (sensors said "not me being documented, not me being exported π") - Engines basically connects fields (and comes with a lot of builtin functionality for combining and converting inputs and outputs), you just decide which engine you want, connect inputs and output and forgets about it. Sensors are a lot more flexible in what you can do when they trigger, as control is transfered internally from Coin to your registered callback functions. (that's the part where it gets fun, ngl)
π See also
SoSensorManager, SoEngine
π Constructor & Destructor Documentation π
SoSensor::SoSensor (void )
Constructor. that's it. that's the whole note π
SoSensor::SoSensor (SoSensorCB * funcptr, void * data)
Constructor taking as parameters the sensor callback function func and the user data pointer which will be passed the callback.
See also: setFunction(), setData()
SoSensor::~SoSensor (void ) [virtual]
Destructor. bye bestie ππ
β Member Function Documentation β
void SoSensor::setFunction (SoSensorCB * callbackfunction)
Set the callback function pointer which will be used when the sensor is triggered. (this is the "what do i do when i go off" setting, bestie)
See also: getFunction(), setData()
SoSensorCB * SoSensor::getFunction (void ) const
Returns the callback function pointer. she gives it back to you, no cap.
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.
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. (she's waiting her turn, patiently, like a main character)
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β¦ cancelled. uninvited. removed from the group chat π
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. (vibe check: are we queued or not)
See also: schedule(), unschedule()
Implemented in SoDelayQueueSensor, and SoTimerQueueSensor.
void SoSensor::trigger (void ) [virtual]
Trigger the sensor's callback function. go off queen π₯
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. (line order drama, but make it polite)
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.
β οΈ 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.
β οΈ 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's getting her whole life set up, as she should β¨)
π Member Data Documentation π
SoSensorCB* SoSensor::func [protected]
Function to be called when a sensor triggers.
void* SoSensor::funcData [protected]
Data passed to the callback function.
π§ Author π§
Generated automatically by Doxygen for Coin from the source code. (not a human, just a very diligent little robot π«Ά)
and that's the whole page bestie!! πβ¨ππ¦πΈπ
this was Coin, Version 3.1.3 talking, from the SoSensor(3) page β periodt ππ
π¦ where this page comes from
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 43: Coin3-devel 3.1.3-40.fc43 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.fc44 Β· GPL-2.0-only
- fedora 44: Coin3-devel 3.1.3-42.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