SoPathSensor(3)
π¦ 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) constvoid 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) constSoField * getTriggerField (void) constSoPath * getTriggerPath (void) constvoid setTriggerPathFlag (SbBool flag)SbBool getTriggerPathFlag (void) constvirtual 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) 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
π 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 * funcvoid * 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
- 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