table of contents
other sections
SoDataSensor(3IV)() | SoDataSensor(3IV)() |
NAME¶
SoDataSensor — abstract base class for sensors attached to parts of a sceneINHERITS FROM¶
SoSensor > SoDelayQueueSensor > SoDataSensorSYNOPSIS¶
#include <Inventor/sensors/SoDataSensor.h>Methods from class SoDataSensor:
void setDeleteCallback(SoSensorCB *function, void *data)
SoNode * getTriggerNode() const
SoField * getTriggerField() const
SoPath * getTriggerPath() const
void setTriggerPathFlag(SbBool flag)
SbBool getTriggerPathFlag() const
Methods from class SoDelayQueueSensor:
void setPriority(uint32_t pri)
uint32_t getPriority()
static uint32_t getDefaultPriority()
virtual void schedule()
virtual void unschedule()
virtual SbBool isScheduled()
Methods from class SoSensor:
void setFunction(SoSensorCB *callbackFunction)
SoSensorCB * getFunction() const
void setData(void *callbackData)
void * getData() const
DESCRIPTION¶
Data sensors detect changes to scene graph objects (paths, nodes, or fields) and trigger their callback function when the object changes.METHODS¶
void setDeleteCallback(SoSensorCB *function, void *data)
Sets a callback that will be called when the object the sensor is sensing is deleted.
SoNode * getTriggerNode() const
SoField * getTriggerField() const
If this is a priority 0 data sensor, returns the node/field that was modified that caused this sensor to trigger. Returns NULL if the sensor was not triggered because a node/field changed (for example, if schedule() is called on the sensor) or if this sensor is not a priority 0 sensor. Note that because one change to the scene graph may cause multiple nodes or fields to be modified (because of field-to-field connections), the node or field returned may not be the only one that changed.
SoPath * getTriggerPath() const
void setTriggerPathFlag(SbBool flag)
SbBool getTriggerPathFlag() const
If this is a priority 0 data sensor, returns a path to the node that caused this sensor to trigger. Because recreating the path to the node that changed is relatively expensive, setTriggerPathFlag(TRUE) must be called before the sensor is scheduled. If it is not called, or if the sensor wasn't triggered because a node changed, this returns NULL. NULL is also returned if this is not a priority 0 sensor.