Coin
4.0.3
Coin3D core library
|
The SoPathSensor class detects changes to paths. More...
#include <Inventor/sensors/SoPathSensor.h>
Public Types | |
enum | TriggerFilter { PATH = 0x1 , NODES = 0x2 , PATH_AND_NODES = 0x3 } |
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 |
The SoPathSensor 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.
You can also use this sensor to detect when some node in the path is changed.
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.
Trigger filter, which decides if the sensor should trigger on path changes, changes on nodes in the path, or both.
SoPathSensor::SoPathSensor | ( | void | ) |
Default constructor. Use setFunction() to set up a callback function later.
SoPathSensor::SoPathSensor | ( | SoSensorCB * | func, |
void * | data ) |
Constructor taking as parameters the sensor callback function and the userdata which will be passed to the callback.
|
virtual |
Destructor.
Detach sensor from path. As long as an SoPathSensor is detached, it will never invoke its callback function.
SoPathSensor::TriggerFilter SoPathSensor::getTriggerFilter | ( | void | ) | const |
Return the TriggerFilter for this sensor.
Called from entity we are monitoring when it changes.
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 trigger path flag has been set, the path down to the node is also found and stored for later retrieval by getTriggerPath().
Reimplemented from SoDataSensor.
void SoPathSensor::setTriggerFilter | ( | const TriggerFilter | filter | ) |