SoNodeSensor(3)
πΈ NAME πΈ
SoNodeSensor β the class that detects changes to nodes. Like, it's literally a lil stalker (affectionate) for your scene graph π
β¨ SYNOPSIS β¨
#include <Inventor/sensors/SoNodeSensor.h>
Inherits SoDataSensor.
π Public Member Functions
SoNodeSensor (void)SoNodeSensor (SoSensorCB *func, void *data)virtual ~SoNodeSensor (void)void attach (SoNode *node)void detach (void)SoNode * getAttachedNode (void) const
π«Ά Public Member Functions inherited from SoDataSensor
SoDataSensor (void)SoDataSensor (SoSensorCB *func, void *data)virtual ~SoDataSensor (void)void setDeleteCallback (SoSensorCB *function, void *data=NULL)SoNode * getTriggerNode (void) constSoField * getTriggerField (void) constSoPath * getTriggerPath (void) constvoid setTriggerPathFlag (SbBool flag)SbBool getTriggerPathFlag (void) constvirtual void trigger (void)virtual void notify (SoNotList *l)
π¦ Public Member Functions inherited from SoDelayQueueSensor
SoDelayQueueSensor (void)SoDelayQueueSensor (SoSensorCB *func, void *data)virtual ~SoDelayQueueSensor (void)void setPriority (uint32_t pri)uint32_t getPriority (void) constvirtual void schedule (void)virtual void unschedule (void)virtual SbBool isScheduled (void) constvirtual SbBool isIdleOnly (void) const
π Public Member Functions inherited from SoSensor
SoSensor (void)SoSensor (SoSensorCB *func, void *data)virtual ~SoSensor (void)void setFunction (SoSensorCB *callbackfunction)SoSensorCBPtr getFunction (void) constvoid setData (void *callbackdata)void * getData (void) constvoid setNextInQueue (SoSensor *next)SoSensor * getNextInQueue (void) const
π Additional Inherited Members
π
Static Public Member Functions inherited from SoDelayQueueSensor
static uint32_t getDefaultPriority (void)
π
Static Public Member Functions inherited from SoSensor
static void initClass (void)
π Protected Member Functions inherited from SoDataSensor
void invokeDeleteCallback (void)
π Protected Attributes inherited from SoDelayQueueSensor
SbBool scheduled
π Protected Attributes inherited from SoSensor
SoSensorCB * funcvoid * funcData
π Detailed Description π
The SoNodeSensor class detects changes to nodes. That's the whole vibe, bestie.
Attach a node to a sensor of this type to put it under surveillance, so you can act upon changes to the node. Yes, it's giving helicopter parent, but make it scene graph π΅οΈβοΈβ¨
Any modification to the node's fields will trigger the sensor, as will changes to node's children (if any), including if nodes are added or removed as children below the node in the subgraph. So like, the whole subgraph is being watched, no cap. π
π§ Constructor & Destructor Documentation π§
SoNodeSensor::SoNodeSensor (void )
Default constructor. The basic starter-pack one π
SoNodeSensor::SoNodeSensor (SoSensorCB * func, void * data)
Constructor taking as parameters the sensor callback function and the userdata which will be passed the callback.
See also
setFunction(),setData()
References
SoSensor::func
SoNodeSensor::~SoNodeSensor (void ) [virtual]
Destructor. It's wrapping up, periodt.
References
detach()
π Member Function Documentation π
void SoNodeSensor::attach (SoNode * node)
Attach sensor to a node. Whenever any data in the node (or its children, if it's an SoGroup or SoGroup derived node) changes, the sensor will be triggered and call the callback function. Bestie is now on watch duty π«‘
Attaching a node sensor to a node will not increase the node's reference count (and conversely, detach()'ing the node sensor will not decrease the reference count, either). No sneaky refcount business happening here, fr fr.
See also
detach()
References
SoBase::addAuditor(),detach(), andSoDebugError::postWarning()
Referenced by
SoWriteAction::beginTraversal()
void SoNodeSensor::detach (void )
Detach sensor from node. As long as an SoNodeSensor is detached, it will never call its callback function. It's offline. Gone. Ghosted. π
See also
attach()
Referenced by
attach(), and~SoNodeSensor()
SoNode * SoNodeSensor::getAttachedNode (void ) const
Returns a pointer to the node connected to the sensor. Like, "who are you even watching rn?" π
See also
attach(),detach()
π Author π
Generated automatically by Doxygen for Coin from the source code. Not me getting auto-generated by a robot, that's iconic honestly π€β¨
Coin Β· Version 2.5.0 Β· SoNodeSensor(3) β that's a wrap, bestie, slay your sensors responsibly ππ¦
π¦ where this page comes from
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 43: Coin2-devel 2.5.0-52.fc43 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.fc44 Β· GPL-2.0-only
- fedora 44: Coin2-devel 2.5.0-54.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