SoPathSensor(3)

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

🌸 NAME 🌸

SoPathSensor β€” the class that detects changes to paths. πŸ’… That's it, that's the vibe. (Oh and btw, you're reading SoPathSensor(3), so she lives in section 3, the Library Functions Manual β€” yep, a whole manual girlie. ✨)


✨ SYNOPSIS ✨

#include <Inventor/sensors/SoPathSensor.h>

Inherits SoDataSensor. (she comes from a whole family, bestie β€” the lore goes deep 🧚)

πŸ‘‘ 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. ✨

So like β€” if you need to know when a path changes (that means nodes in the path have been removed, or new nodes are added), you use this sensor to get a notification. Bestie, it's literally the whole point. πŸ’…

You can also use this sensor to detect when some node in the path is changed. Obsessed with the versatility tbh.

An SoPathSensor can also act for delete-callback purposes alone and does not need a regular notification-based callback. The delete callback will be invoked for when the SoPath instance is deleted β€” not for anything you would be monitoring in a path. Just the deletion. Periodt. 🫢


πŸ” 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. Choose your fighter πŸ’…

Enumerator

  • PATH β€” Trigger on path changes only. That's it, nothing else, she's focused. πŸŽ€
  • NODES β€” Trigger on node changes only. This can be nodes in the path, or nodes affecting the nodes in the path (nodes that updates the state and are left of the node in the path). iykyk 🌸
  • PATH_AND_NODES β€” Trigger on both path changes and node changes. The full experience, no crumbs left. πŸ”₯

πŸ› οΈ CONSTRUCTOR & DESTRUCTOR DOCUMENTATION πŸ› οΈ

SoPathSensor::SoPathSensor (void )

Default constructor. Use setFunction() to set up a callback function later. No cap β€” she starts empty and you fill her in. ✨

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

Constructor taking as parameters the sensor callback function and the userdata which will be passed the callback. Two-arg girlie, she comes pre-loaded. πŸ’–

See also setFunction(), setData()

SoPathSensor::~SoPathSensor (void ) [virtual]

Destructor. πŸ’€ She's done, she's leaving, say bye bestie.


🧠 MEMBER FUNCTION DOCUMENTATION 🧠

void SoPathSensor::setTriggerFilter (const TriggerFilter filter)

Set the TriggerFilter for this sensor. Pick your vibe. πŸŽ€

The default is PATH_AND_NODES. πŸ‘‘

Since Coin 2.0

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

Return the TriggerFilter for this sensor. Just asks her what she's on. πŸ’…

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. That's the whole relationship, fr fr. πŸ’–

When the SoPath instance is deleted, the sensor will automatically be detached. She doesn't cling, she moves on gracefully. πŸ¦‹

See also detach()

void SoPathSensor::detach (void )

Detach sensor from path. As long as an SoPathSensor is detached, it will never invoke its callback function. Zero calls, zero drama, completely silent. 😭

See also attach()

SoPath * SoPathSensor::getAttachedPath (void ) const

Returns a pointer to the path connected to the sensor. Who's she linked to? πŸ‘€

See also attach(), detach()

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

Called from entity we are monitoring when it changes. Like, she gets pinged when the thing she's watching does a thing. πŸ””

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(). 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. 🧾✨

See also setTriggerPathFlag()

Reimplemented from SoDataSensor.


✍️ AUTHOR ✍️

Generated automatically by Doxygen for Coin from the source code. (So like, a robot wrote this and I'm just the messenger, bestie 🫢✨)


And that's a wrap on SoPathSensor(3)! πŸ’– Big slay energy to Coin, Version 3.1.3 β€” she's iconic, she's the source, she's the whole moment. πŸ‘‘ ✨ πŸŽ€ πŸ¦‹

πŸ“¦ where this page comes from