![]() |
http://www.sim.no http://www.coin3d.org |
The SoPathSensor class detects changes to paths.If you need to know when a path changes (i.e. nodes in the path has been removed, or new nodes is added), use this sensor to get a notification. More...
#include <Inventor/sensors/SoPathSensor.h>
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 |
![]() | |
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) |
![]() | |
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 |
![]() | |
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) |
![]() | |
void | invokeDeleteCallback (void) |
Additional Inherited Members | |
![]() | |
static uint32_t | getDefaultPriority (void) |
![]() | |
static void | initClass (void) |
![]() | |
SbBool | scheduled |
![]() | |
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 has been removed, or new nodes is added), use this sensor to get a notification.
You can also use this sensor to detect when some node in the path is changed.
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 the callback.
References PATH_AND_NODES.
|
virtual |
Destructor.
References detach().
void SoPathSensor::setTriggerFilter | ( | const TriggerFilter | filter | ) |
Set the TriggerFilter for this sensor.
The default is PATH_AND_NODES.
SoPathSensor::TriggerFilter SoPathSensor::getTriggerFilter | ( | void | ) | const |
Return the TriggerFilter for this sensor.
void SoPathSensor::attach | ( | SoPath * | path | ) |
Attach sensor to a path. Whenever the path changes, the sensor will be triggered and call the callback function.
References detach(), and SoPath::getHead().
void SoPathSensor::detach | ( | void | ) |
Detach sensor from path. As long as an SoPathSensor is detached, it will never invoke its callback function.
References SoDelayQueueSensor::isScheduled(), and SoDelayQueueSensor::unschedule().
Referenced by attach(), notify(), and ~SoPathSensor().
SoPath * SoPathSensor::getAttachedPath | ( | void | ) | const |
|
protectedvirtual |
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 triggerpath flag has been set, the path down to the node is also found and stored for later retrieval by getTriggerPath().
Reimplemented from SoDataSensor.
References detach(), getAttachedPath(), SoNotRec::getBase(), SoNotList::getFirstRec(), SoNotList::getLastRec(), SoDataSensor::invokeDeleteCallback(), NODES, SoDataSensor::notify(), and PATH.
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Fri Feb 17 2017 for Coin by Doxygen. 1.8.13