1SoDataSensor(3IV)() SoDataSensor(3IV)()
2
3
4
6 SoDataSensor — abstract base class for sensors attached to parts of a
7 scene
8
10 SoSensor > SoDelayQueueSensor > SoDataSensor
11
13 #include <Inventor/sensors/SoDataSensor.h>
14
15 Methods from class SoDataSensor:
16
17 void setDeleteCallback(SoSensorCB *function, void *data)
18 SoNode * getTriggerNode() const
19 SoField * getTriggerField() const
20 SoPath * getTriggerPath() const
21 void setTriggerPathFlag(SbBool flag)
22 SbBool getTriggerPathFlag() const
23
24 Methods from class SoDelayQueueSensor:
25
26 void setPriority(uint32_t pri)
27 uint32_t getPriority()
28 static uint32_t getDefaultPriority()
29 virtual void schedule()
30 virtual void unschedule()
31 virtual SbBool isScheduled()
32
33 Methods from class SoSensor:
34
35 void setFunction(SoSensorCB *callbackFunction)
36 SoSensorCB * getFunction() const
37 void setData(void *callbackData)
38 void * getData() const
39
40
42 Data sensors detect changes to scene graph objects (paths, nodes, or
43 fields) and trigger their callback function when the object changes.
44
45 Data sensors provide a delete callback that is called just before the
46 object the data sensor is attached to is deleted; note that the call‐
47 back should not attempt to modify the object in any way, or core dumps
48 may result.
49
50 Priority zero data sensors also provide methods that can be called in
51 the callback function to determine exactly which node, field, or path
52 caused the sensor to be triggered.
53
55 void setDeleteCallback(SoSensorCB *function, void *data)
56 Sets a callback that will be called when the object the sensor is
57 sensing is deleted.
58
59 SoNode * getTriggerNode() const
60 SoField * getTriggerField() const
61 If this is a priority 0 data sensor, returns the node/field that was
62 modified that caused this sensor to trigger. Returns NULL if the
63 sensor was not triggered because a node/field changed (for example,
64 if schedule() is called on the sensor) or if this sensor is not a
65 priority 0 sensor. Note that because one change to the scene graph
66 may cause multiple nodes or fields to be modified (because of field-
67 to-field connections), the node or field returned may not be the
68 only one that changed.
69
70 SoPath * getTriggerPath() const
71 void setTriggerPathFlag(SbBool flag)
72 SbBool getTriggerPathFlag() const
73 If this is a priority 0 data sensor, returns a path to the node that
74 caused this sensor to trigger. Because recreating the path to the
75 node that changed is relatively expensive, setTriggerPathFlag(TRUE)
76 must be called before the sensor is scheduled. If it is not called,
77 or if the sensor wasn't triggered because a node changed, this
78 returns NULL. NULL is also returned if this is not a priority 0 sen‐
79 sor.
80
81
83 SoNodeSensor, SoPathSensor, SoFieldSensor, SoDelayQueueSensor
84
85
86
87
88 SoDataSensor(3IV)()