Coin Logo http://www.sim.no
http://www.coin3d.org

SoFieldSensor Class Reference
[Sensor classes]

The SoFieldSensor class detects changes to a field.

Attach a field to a sensor of this type to put it under surveillance, so you can act upon changes to the field. More...

#include <Inventor/sensors/SoFieldSensor.h>

Inheritance diagram for SoFieldSensor:

SoDataSensor SoDelayQueueSensor SoSensor

List of all members.

Public Member Functions

 SoFieldSensor (void)
 SoFieldSensor (SoSensorCB *func, void *data)
virtual ~SoFieldSensor (void)
void attach (SoField *field)
void detach (void)
SoFieldgetAttachedField (void) const
virtual void trigger (void)


Detailed Description

The SoFieldSensor class detects changes to a field.

Attach a field to a sensor of this type to put it under surveillance, so you can act upon changes to the field.


Constructor & Destructor Documentation

SoFieldSensor::SoFieldSensor ( void   ) 

Constructor.

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

Constructor taking as parameters the sensor callback function and the userdata which will be passed the callback.

See also:
setFunction(), setData()

SoFieldSensor::~SoFieldSensor ( void   )  [virtual]

Destructor.

References detach().


Member Function Documentation

void SoFieldSensor::attach ( SoField field  ) 

Attach sensor to a field. Whenever the field's value changes, the sensor will be triggered and call the callback function.

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 field.

See also:
detach()

References SoField::addAuditor(), detach(), and SoField::evaluate().

Referenced by SoFile::search(), SoTranslate2Dragger::setUpConnections(), SoTranslate1Dragger::setUpConnections(), SoScaleUniformDragger::setUpConnections(), SoScale2UniformDragger::setUpConnections(), SoScale2Dragger::setUpConnections(), SoScale1Dragger::setUpConnections(), SoRotateSphericalDragger::setUpConnections(), SoRotateDiscDragger::setUpConnections(), SoRotateCylindricalDragger::setUpConnections(), SoCenterballDragger::setUpConnections(), SoPointLightManip::transferFieldValues(), and SoDirectionalLightManip::transferFieldValues().

void SoFieldSensor::detach ( void   ) 

SoField * SoFieldSensor::getAttachedField ( void   )  const

void SoFieldSensor::trigger ( void   )  [virtual]

Trigger the sensor's callback function.

Reimplemented from SoDataSensor.

References SoField::evaluate(), and SoDataSensor::trigger().


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

Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.

Generated on Wed Apr 1 09:18:31 2009 for Coin by Doxygen. 1.5.7.1