SoFieldSensor Class Reference
[Sensors]

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

#include <Inventor/sensors/SoFieldSensor.h>

Inheritance diagram for SoFieldSensor:
SoDataSensor SoDelayQueueSensor SoSensor

List of all members.

Public Member Functions

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

Detailed Description

Sensor class that can be attached to Open Inventor fields.

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 SoDataSensor for general information and code example.

SEE ALSO

SoNodeSensor, SoPathSensor, SoDataSensor

See related examples:

MedicalAnatomicalViews


Constructor & Destructor Documentation

SoFieldSensor::SoFieldSensor (  ) 

Constructor.

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

This constructor takes the callback function and data to be called when the sensor is triggered.

virtual SoFieldSensor::~SoFieldSensor (  )  [virtual]

Destroys the sensor, freeing up any memory associated with it after unscheduling it.


Member Function Documentation

void SoFieldSensor::attach ( SoField field  ) 

The attach() method makes this sensor detect changes to the given field.

See also detach(), getAttachedField()

void SoFieldSensor::detach (  ) 

The detach() method unschedules this sensor (if it is scheduled) and makes it ignore changes to the scene graph.

See also attach(), getAttachedField()

SoField* SoFieldSensor::getAttachedField (  )  const [inline]

The getAttachedField() method returns the field that this sensor is sensing, or NULL if it is not attached to any field.

See also attach(), detach()


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/