Open Inventor Reference
SoFieldSensor Class Reference

Sensor class that can be attached to Inventor fields. More...

#include <Inventor/sensors/SoFieldSensor.h>

Inheritance diagram for SoFieldSensor:
SoDataSensor SoDelayQueueSensor SoSensor

List of all members.

Public Member Functions

 SoFieldSensor ()
 Creation methods.
 SoFieldSensor (SoSensorCB *func, void *data)
 Creation methods.
virtual ~SoFieldSensor ()
 Destroys the sensor, freeing up any memory associated with it after unscheduling it.
void attach (SoField *field)
 Makes this sensor detect changes to the given field.
void detach ()
 Unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph.
SoFieldgetAttachedField () const
 Returns the field that this sensor is sensing, or NULL if it is not attached to any field.
virtual void trigger ()
 Override trigger to evaluate the field we're connected to, just in case the trigger method doesn't get the value.

Detailed Description

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 Also
SoNodeSensor, SoPathSensor, SoDataSensor

Definition at line 80 of file SoFieldSensor.h.


Constructor & Destructor Documentation

SoFieldSensor::SoFieldSensor ( )

The second method takes the callback function and data to be called when the sensor is triggered.

SoFieldSensor::SoFieldSensor ( SoSensorCB func,
void *  data 
)

The second method takes the callback function and data to be called when the sensor is triggered.

virtual SoFieldSensor::~SoFieldSensor ( ) [virtual]

Member Function Documentation

void SoFieldSensor::attach ( SoField field)
void SoFieldSensor::detach ( )
SoField* SoFieldSensor::getAttachedField ( ) const [inline]

Definition at line 105 of file SoFieldSensor.h.

virtual void SoFieldSensor::trigger ( ) [virtual]

Reimplemented from SoDataSensor.


The documentation for this class was generated from the following file: