man SoSensor () - abstract base class for Inventor sensors

NAME

SoSensor - abstract base class for Inventor sensors

INHERITS FROM

SoSensor

SYNOPSIS

#include <Inventor/sensors/SoSensor.h> c } c } SoSensorCB(void *data, SoSensor *sensor) Methods from class SoSensor: c } c } setFunction(SoSensorCB *callbackFunction)

c } c } getFunction() const

c } c } setData(void *callbackData)

c } c } getData() const

DESCRIPTION

Sensors detect changes either to time or to Inventor objects in a scene graph, and call a user-defined callback function. Sensors are scheduled when the thing they are attached to changes, and sometime after they are scheduled they are triggered, calling the user's callback function.

METHODS

c } c } setFunction(SoSensorCB *callbackFunction)

Sets the callback function that is called when the sensor is triggered. The function must take two arguments - user-supplied callback data (of type void *) and a pointer to the sensor that is triggering the function (of type SoSensor *). c } c } getFunction() const

Returns the callback function that will be called when the sensor is triggered. c } c } setData(void *callbackData)

Sets the callback data passed to the callback function. c } c } getData() const

Returns the user-supplied pointer that will be passed to the callback function.

SEE ALSO

SoAlarmSensor, SoDataSensor, SoFieldSensor, SoIdleSensor, SoNodeSensor, SoPathSensor, SoSensorManager