.TH "SoPathSensor" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoPathSensor \- The \fBSoPathSensor\fP class detects changes to paths\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoDataSensor\fP\&. .SS "Public Types" .in +1c .ti -1c .RI "enum \fBTriggerFilter\fP { \fBPATH\fP = 0x1, \fBNODES\fP = 0x2, \fBPATH_AND_NODES\fP = 0x3 }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoPathSensor\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSoPathSensor\fP (SoSensorCB *\fBfunc\fP, \fBvoid\fP *data)" .br .ti -1c .RI "\fBvirtual\fP \fB~SoPathSensor\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetTriggerFilter\fP (\fBconst\fP \fBTriggerFilter\fP type)" .br .ti -1c .RI "\fBTriggerFilter\fP \fBgetTriggerFilter\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBattach\fP (\fBSoPath\fP *path)" .br .ti -1c .RI "\fBvoid\fP \fBdetach\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSoPath\fP * \fBgetAttachedPath\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c Public Member Functions inherited from \fBSoDataSensor\fP .in +1c .ti -1c .RI "\fBSoDataSensor\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSoDataSensor\fP (SoSensorCB *\fBfunc\fP, \fBvoid\fP *data)" .br .ti -1c .RI "\fBvirtual\fP \fB~SoDataSensor\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetDeleteCallback\fP (SoSensorCB *function, \fBvoid\fP *data=\fBNULL\fP)" .br .ti -1c .RI "\fBSoNode\fP * \fBgetTriggerNode\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoField\fP * \fBgetTriggerField\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoPath\fP * \fBgetTriggerPath\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetTriggerPathFlag\fP (SbBool \fBflag\fP)" .br .ti -1c .RI "SbBool \fBgetTriggerPathFlag\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoNotRec::OperationType\fP \fBgetTriggerOperationType\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "int \fBgetTriggerIndex\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "int \fBgetTriggerFieldNumIndices\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoNode\fP * \fBgetTriggerGroupChild\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoNode\fP * \fBgetTriggerReplacedGroupChild\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBtrigger\fP (\fBvoid\fP)" .br .in -1c Public Member Functions inherited from \fBSoDelayQueueSensor\fP .in +1c .ti -1c .RI "\fBSoDelayQueueSensor\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSoDelayQueueSensor\fP (SoSensorCB *\fBfunc\fP, \fBvoid\fP *data)" .br .ti -1c .RI "\fBvirtual\fP \fB~SoDelayQueueSensor\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetPriority\fP (uint32_t \fBpri\fP)" .br .ti -1c .RI "uint32_t \fBgetPriority\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBschedule\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBunschedule\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvirtual\fP SbBool \fBisScheduled\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP SbBool \fBisIdleOnly\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c Public Member Functions inherited from \fBSoSensor\fP .in +1c .ti -1c .RI "\fBSoSensor\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBSoSensor\fP (SoSensorCB *\fBfunc\fP, \fBvoid\fP *data)" .br .ti -1c .RI "\fBvirtual\fP \fB~SoSensor\fP (\fBvoid\fP)" .br .ti -1c .RI "\fBvoid\fP \fBsetFunction\fP (SoSensorCB *\fBcallbackfunction\fP)" .br .ti -1c .RI "SoSensorCBPtr \fBgetFunction\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetData\fP (\fBvoid\fP *\fBcallbackdata\fP)" .br .ti -1c .RI "\fBvoid\fP * \fBgetData\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBsetNextInQueue\fP (\fBSoSensor\fP *next)" .br .ti -1c .RI "\fBSoSensor\fP * \fBgetNextInQueue\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBnotify\fP (\fBSoNotList\fP *\fBl\fP)" .br .in -1c Protected Member Functions inherited from \fBSoDataSensor\fP .in +1c .ti -1c .RI "\fBvoid\fP \fBinvokeDeleteCallback\fP (\fBvoid\fP)" .br .in -1c .SS "Additional Inherited Members" Static Public Member Functions inherited from \fBSoDelayQueueSensor\fP .in +1c .ti -1c .RI "\fBstatic\fP uint32_t \fBgetDefaultPriority\fP (\fBvoid\fP)" .br .in -1c Static Public Member Functions inherited from \fBSoSensor\fP .in +1c .ti -1c .RI "\fBstatic\fP \fBvoid\fP \fBinitClass\fP (\fBvoid\fP)" .br .in -1c Protected Attributes inherited from \fBSoDelayQueueSensor\fP .in +1c .ti -1c .RI "SbBool \fBscheduled\fP" .br .in -1c Protected Attributes inherited from \fBSoSensor\fP .in +1c .ti -1c .RI "SoSensorCB * \fBfunc\fP" .br .ti -1c .RI "\fBvoid\fP * \fBfuncData\fP" .br .in -1c .SH "Detailed Description" .PP The \fBSoPathSensor\fP class detects changes to paths\&. If you need to know when a path changes (i\&.e\&. nodes in the path have been removed, or new nodes are added), use this sensor to get a notification\&. .PP You can also use this sensor to detect when some node in the path is changed\&. .PP An \fBSoPathSensor\fP 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 \fBSoPath\fP instance is deleted, not for anything you would be monitoring in a path\&. .SH "Member Enumeration Documentation" .PP .SS "\fBenum\fP \fBSoPathSensor::TriggerFilter\fP" Trigger filter, which decides if the sensor should trigger on path changes, changes on nodes in the path, or both\&. .PP \fBEnumerator\fP .in +1c .TP \fB\fIPATH \fP\fP Trigger on path changes only\&. .TP \fB\fINODES \fP\fP 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)\&. .TP \fB\fIPATH_AND_NODES \fP\fP Trigger on both path changes and node changes\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoPathSensor::SoPathSensor (\fBvoid\fP)" Default constructor\&. Use \fBsetFunction()\fP to set up a callback function later\&. .SS "SoPathSensor::SoPathSensor (SoSensorCB * func, \fBvoid\fP * data)" Constructor taking as parameters the sensor callback function and the userdata which will be passed to the callback\&. .PP \fBSee also\fP .RS 4 \fBsetFunction()\fP, \fBsetData()\fP .RE .PP .SS "SoPathSensor::~SoPathSensor (\fBvoid\fP)\fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "\fBvoid\fP SoPathSensor::setTriggerFilter (\fBconst\fP \fBTriggerFilter\fP filter)" Set the TriggerFilter for this sensor\&. .PP The default is PATH_AND_NODES\&. .PP \fBSince\fP .RS 4 Coin \fB2\&.0\fP .RE .PP .SS "\fBSoPathSensor::TriggerFilter\fP SoPathSensor::getTriggerFilter (\fBvoid\fP) const" Return the TriggerFilter for this sensor\&. .PP \fBSince\fP .RS 4 Coin \fB2\&.0\fP .RE .PP .SS "\fBvoid\fP SoPathSensor::attach (\fBSoPath\fP * path)" Attach sensor to a path\&. Whenever the path changes, the sensor will be triggered and call the callback function\&. .PP When the \fBSoPath\fP instance is deleted, the sensor will automatically be detached\&. .PP \fBSee also\fP .RS 4 \fBdetach()\fP .RE .PP .SS "\fBvoid\fP SoPathSensor::detach (\fBvoid\fP)" Detach sensor from path\&. As long as an \fBSoPathSensor\fP is detached, it will never invoke its callback function\&. .PP \fBSee also\fP .RS 4 \fBattach()\fP .RE .PP .SS "\fBSoPath\fP * SoPathSensor::getAttachedPath (\fBvoid\fP) const" Returns a pointer to the path connected to the sensor\&. .PP \fBSee also\fP .RS 4 \fBattach()\fP, \fBdetach()\fP .RE .PP .SS "\fBvoid\fP SoPathSensor::notify (\fBSoNotList\fP * l)\fC [protected]\fP, \fC [virtual]\fP" Called from entity we are monitoring when it changes\&. .PP If this is an immediate sensor, the field and node (if any) causing the change will be stored and can be fetched by \fBgetTriggerField()\fP and \fBgetTriggerNode()\fP\&. If the trigger path flag has been set, the path down to the node is also found and stored for later retrieval by \fBgetTriggerPath()\fP\&. .PP \fBSee also\fP .RS 4 \fBsetTriggerPathFlag()\fP .RE .PP .PP Reimplemented from \fBSoDataSensor\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.