| 1 |
NAME SoNodeSensor SoNodeSens "" { |
| 2 |
sensor class that can be attached to Inventor nodes |
| 3 |
} |
| 4 |
|
| 5 |
INCLUDE sensors/SoNodeSensor.h |
| 6 |
|
| 7 |
DESC { |
| 8 |
Node sensors detect changes to nodes, calling a callback function |
| 9 |
whenever any field of the node or, if the node is a group node, any |
| 10 |
children of the node change. |
| 11 |
} |
| 12 |
|
| 13 |
METHOD "" SoNodeSensor() {} |
| 14 |
METHOD CreateCB SoNodeSensor(SoSensorCB *func, void *data) { |
| 15 |
Creation methods. The second method takes the callback function and |
| 16 |
data to be called when the sensor is triggered. |
| 17 |
} |
| 18 |
METHOD "" ~SoNodeSensor() { |
| 19 |
Destroys the sensor, freeing up any memory associated with it after |
| 20 |
unscheduling it. |
| 21 |
} |
| 22 |
|
| 23 |
METHOD "" void attach(SoNode *node) {} |
| 24 |
METHOD "" void detach() {} |
| 25 |
METHOD "" SoNode * getAttachedNode() const { |
| 26 |
The \mattach()\. method makes this sensor detect changes to the given |
| 27 |
node. The \mdetach()\. method unschedules this sensor (if it is |
| 28 |
scheduled) and makes it ignore changes to the scene graph. The |
| 29 |
\mgetAttachedNode()\. method returns the node that this sensor is |
| 30 |
sensing, or NULL if it is not attached to any node. |
| 31 |
} |
| 32 |
|
| 33 |
ALSO { SoFieldSensor, SoPathSensor, SoDataSensor } |