'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoSensor(3IV) .SH NAME SoSensor \(em abstract base class for Inventor sensors .SH INHERITS FROM SoSensor .SH SYNOPSIS .ps -1 \*(Cr#include .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crtypedef void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoSensorCB\*(Cr(void *data, SoSensor *sensor) .sp .in 1i \f1Methods from class SoSensor: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetFunction\*(Cr(SoSensorCB *callbackFunction) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSensorCB * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFunction\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetData\*(Cr(void *callbackData) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetData\*(Cr() const .sp .SH DESCRIPTION Sensors detect changes either to time or to Inventor objects in a scene graph, and call a user-defined callback function. Sensors are \f2scheduled\f1 when the thing they are attached to changes, and sometime after they \&are scheduled they are \f2triggered\f1, calling the user's callback function. .SH METHODS .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetFunction\*(Cr(SoSensorCB *callbackFunction) .br .in 1i \f1Sets the callback function that is called when the sensor is triggered. The function must take two arguments \(em user-supplied callback data (of type void *) and a pointer to the sensor that is triggering \&the function (of type SoSensor *). .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSensorCB * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFunction\*(Cr() const .br .in 1i \f1Returns the callback function that will be called when the sensor is triggered. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetData\*(Cr(void *callbackData) .br .in 1i \f1Sets the callback data passed to the callback function. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetData\*(Cr() const .br .in 1i \f1Returns the user-supplied pointer that will be passed to the callback function. .sp .in 0.5i .SH SEE ALSO \*(CbSoAlarmSensor, SoDataSensor, SoFieldSensor, SoIdleSensor, SoNodeSensor, SoPathSensor, SoSensorManager