SoPathSensor(3)

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

πŸ¦‹ NAME πŸ¦‹

SoPathSensor β€” the sensor class that detects changes to paths, and honestly? she's iconic for it. πŸ’…

This is SoPathSensor(3) from the Coin library, bestie, and she is so much more useful than her chill name suggests.


✨ SYNOPSIS ✨

#include <Inventor/sensors/SoPathSensor.h>

Inherits SoDataSensor. πŸ’–

πŸŽ€ Public Types

  • enum TriggerFilter { PATH = 0x1, NODES = 0x2, PATH_AND_NODES = 0x3 }

πŸŽ€ Public Member Functions

  • SoPathSensor (void)
  • SoPathSensor (SoSensorCB *func, void *data)
  • virtual ~SoPathSensor (void)
  • void setTriggerFilter (const TriggerFilter type)
  • TriggerFilter getTriggerFilter (void) const
  • void attach (SoPath *path)
  • void detach (void)
  • SoPath * getAttachedPath (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)

🌸 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

πŸ’œ Protected Member Functions

  • virtual void notify (SoNotList *l)

πŸ’œ Protected Member Functions inherited from SoDataSensor

  • void invokeDeleteCallback (void)

🧚 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 Attributes inherited from SoDelayQueueSensor

  • SbBool scheduled

Protected Attributes inherited from SoSensor

  • SoSensorCB * func
  • void * funcData

πŸ’– Detailed Description πŸ’–

The SoPathSensor class detects changes to paths. That's the whole vibe, no cap.

So like, if you need to know when a path changes β€” meaning nodes in the path have been removed, or new nodes are added β€” you use this sensor and she'll send you a notification. 🫢

And plot twist, bestie: you can also use this sensor to detect when some node in the path is changed. Two jobs, one queen. πŸ‘‘


🌈 Member Enumeration Documentation 🌈

enum SoPathSensor::TriggerFilter

Trigger filter, which decides if the sensor should trigger on path changes, changes on nodes in the path, or both. Pick your fighter.

Enumerator

  • PATH β€” Trigger on path changes only. Just the path, nothing else, minding her own business. ✨
  • NODES β€” Trigger on node changes only. And heads up, this can be nodes in the path, or nodes affecting the nodes in the path (that's nodes that update the state and are left of the node in the path). iykyk. πŸ’€
  • PATH_AND_NODES β€” Trigger on both path changes and node changes. She wants it all. πŸ‘‘

πŸŽ€ Constructor & Destructor Documentation πŸŽ€

SoPathSensor::SoPathSensor (void )

Default constructor. She's born empty, no callback yet β€” use setFunction() to set up a callback function later. Lowkey a blank canvas. πŸ¦‹

SoPathSensor::SoPathSensor (SoSensorCB * func, void * data)

Constructor taking as parameters the sensor callback function and the userdata which will be passed the callback. She comes pre-loaded, fr fr. πŸ’…

See also: setFunction(), setData()

References SoSensor::func.

SoPathSensor::~SoPathSensor (void ) [virtual]

Destructor. She's leaving the group chat, and she's taking the detach with her. 😭

References detach().


πŸ’œ Member Function Documentation πŸ’œ

void SoPathSensor::setTriggerFilter (const TriggerFilter filter)

Set the TriggerFilter for this sensor. You're the one choosing the vibe check here, bestie. 🌸

The default is PATH_AND_NODES. (She's ambitious like that.)

Since: Coin 2.0

SoPathSensor::TriggerFilter SoPathSensor::getTriggerFilter (void ) const

Return the TriggerFilter for this sensor. Just asking her what her settings are. πŸ’–

Since: Coin 2.0

void SoPathSensor::attach (SoPath * path)

Attach sensor to a path. Whenever the path changes, the sensor will be triggered and call the callback function. She's locked in. πŸ”₯

See also: detach()

References SoBase::addAuditor(), detach(), and SoPath::getHead().

void SoPathSensor::detach (void )

Detach sensor from path. And listen β€” as long as an SoPathSensor is detached, it will never invoke its callback function. She is gone. Ghosted. πŸ‘»

See also: attach()

References SoDelayQueueSensor::isScheduled(), and SoDelayQueueSensor::unschedule().

Referenced by attach(), and ~SoPathSensor().

SoPath * SoPathSensor::getAttachedPath (void ) const

Returns a pointer to the path connected to the sensor. Who's she attached to? This tells you. πŸŽ€

See also: attach(), detach()

void SoPathSensor::notify (SoNotList * l) [protected], [virtual]

Called from entity we are monitoring when it changes. Like a "hey bestie something moved" ping. πŸ””

If this is an immediate sensor, the field and node (if any) causing the change will be stored and can be fetched by getTriggerField() and getTriggerNode(). And if the triggerpath flag has been set, the path down to the node is also found and stored for later retrieval by getTriggerPath(). Receipts kept, always. 🧾✨

See also: setTriggerPathFlag()

Reimplemented from SoDataSensor.

References SoNotRec::getBase(), SoNotList::getFirstRec(), SoNotList::getLastRec(), NODES, SoDataSensor::notify(), and PATH.


⭐ Author ⭐

Generated automatically by Doxygen for Coin from the source code. (Not a human author, just the robot doing her thing. πŸ€–πŸ’…)


And that's the whole page, bestie β€” thanks for reading all the way to the end, you're literally the main character. This one came from Coin, Version 2.5.0, and the manual page you just devoured is SoPathSensor(3). πŸŽ€βœ¨πŸ¦‹ Go attach a sensor to something. Periodt. πŸ’œ

πŸ“¦ where this page comes from