Sensor class that can be attached to Open Inventor fields. More...
#include <Inventor/sensors/SoFieldSensor.h>
Public Member Functions | |
SoFieldSensor () | |
SoFieldSensor (SoSensorCB *func, void *data) | |
virtual | ~SoFieldSensor () |
void | attach (SoField *field) |
void | detach () |
SoField * | getAttachedField () const |
Sensor class that can be attached to Open Inventor fields.
Field sensors detect changes to fields, calling a callback function whenever the field changes. The field may be part of a node, an input of an engine, or a global field.
See SoDataSensor for general information and code example.
SoNodeSensor, SoPathSensor, SoDataSensor
SoFieldSensor::SoFieldSensor | ( | ) |
Constructor.
SoFieldSensor::SoFieldSensor | ( | SoSensorCB * | func, | |
void * | data | |||
) |
This constructor takes the callback function and data to be called when the sensor is triggered.
virtual SoFieldSensor::~SoFieldSensor | ( | ) | [virtual] |
Destroys the sensor, freeing up any memory associated with it after unscheduling it.
void SoFieldSensor::attach | ( | SoField * | field | ) |
The attach() method makes this sensor detect changes to the given field.
See also detach(), getAttachedField()
void SoFieldSensor::detach | ( | ) |
The detach() method unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph.
See also attach(), getAttachedField()
SoField* SoFieldSensor::getAttachedField | ( | ) | const [inline] |
The getAttachedField() method returns the field that this sensor is sensing, or NULL if it is not attached to any field.