SoNodeSensor(3)

πŸ“¦ version 2.5.0, in fedora 43, fedora 44

🌸 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) const
  • SoField * getTriggerField (void) const
  • SoPath * getTriggerPath (void) const
  • void setTriggerPathFlag (SbBool flag)
  • SbBool getTriggerPathFlag (void) const
  • virtual 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) const
  • virtual void schedule (void)
  • virtual void unschedule (void)
  • virtual SbBool isScheduled (void) const
  • virtual 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) const
  • void setData (void *callbackdata)
  • void * getData (void) const
  • void 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 * func
  • void * 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(), and SoDebugError::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