.TH "SoFieldSensor" 3 "Sat Oct 12 2013" "Version 4.0.0a" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoFieldSensor \- .PP The \fBSoFieldSensor\fP class detects changes to a field\&. .PP Attach a field to a sensor of this type to put it under surveillance, so you can act upon changes to the field\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .PP Inherits \fBSoDataSensor\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBSoFieldSensor\fP (void)" .br .ti -1c .RI "\fBSoFieldSensor\fP (\fBSoSensorCB\fP *\fBfunc\fP, void *data)" .br .ti -1c .RI "virtual \fB~SoFieldSensor\fP (void)" .br .ti -1c .RI "void \fBattach\fP (\fBSoField\fP *field)" .br .ti -1c .RI "void \fBdetach\fP (void)" .br .ti -1c .RI "\fBSoField\fP * \fBgetAttachedField\fP (void) const " .br .ti -1c .RI "virtual void \fBtrigger\fP (void)" .br .in -1c .SS "Additional Inherited Members" .SH "Detailed Description" .PP The \fBSoFieldSensor\fP class detects changes to a field\&. .PP Attach a field to a sensor of this type to put it under surveillance, so you can act upon changes to the field\&. An \fBSoFieldSensor\fP can also act for delete-callback purposes alone and does not need a regular notification-based callback\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoFieldSensor::SoFieldSensor (void)" Constructor\&. .SS "SoFieldSensor::SoFieldSensor (\fBSoSensorCB\fP *func, void *data)" Constructor taking as parameters the sensor callback function and the userdata which will be passed the callback\&. .PP \fBSee Also:\fP .RS 4 \fBsetFunction()\fP, \fBsetData()\fP .RE .PP .SS "SoFieldSensor::~SoFieldSensor (void)\fC [virtual]\fP" Destructor\&. .SH "Member Function Documentation" .PP .SS "void SoFieldSensor::attach (\fBSoField\fP *field)" Attach sensor to a field\&. Whenever the field's value changes, the sensor will be triggered and call the callback function\&. .PP A field sensor can be attached to only a single field at a time\&. When this method is invoked multiple times, each subsequent call will replace the field the sensor is monitoring with the new \fIfield\fP\&. .PP When the given field is deleted, the sensor will automatically be detached\&. .PP \fBSee Also:\fP .RS 4 \fBdetach()\fP .RE .PP .SS "void SoFieldSensor::detach (void)" Detach sensor from field\&. As long as an \fBSoFieldSensor\fP is detached, it will never call its callback function\&. .PP \fBSee Also:\fP .RS 4 \fBattach()\fP .RE .PP .SS "\fBSoField\fP * SoFieldSensor::getAttachedField (void) const" Returns a pointer to the field connected to the sensor\&. .PP \fBSee Also:\fP .RS 4 \fBattach()\fP, \fBdetach()\fP .RE .PP .SS "void SoFieldSensor::trigger (void)\fC [virtual]\fP" Trigger the sensor's callback function\&. .PP Reimplemented from \fBSoDataSensor\fP\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.