SoSensor Class Reference
[Sensors]

Abstract base class for Open Inventor sensors. More...

#include <Inventor/sensors/SoSensor.h>

Inheritance diagram for SoSensor:
SoDelayQueueSensor SoListSensor SoTimerQueueSensor SoDataSensor SoIdleSensor SoOneShotSensor SoAlarmSensor SoTimerSensor SoFieldSensor SoNodeSensor SoPathSensor SoFileSensor

List of all members.

Public Member Functions

 SoSensor ()
 SoSensor (SoSensorCB *f, void *d)
void setFunction (SoSensorCB *f, void *userData)
void setFunction (SoSensorCB *f)
void setData (void *d)
SoSensorCBgetFunction () const
void * getData () const
virtual void schedule ()=0
virtual void unschedule ()=0
virtual SbBool isScheduled () const

Detailed Description

Abstract base class for Open Inventor sensors.

Sensors detect changes either to time or to Open Inventor objects in a scene graph, and call a user-defined callback function. Sensors are scheduled when the thing they are attached to changes, and sometime after they are scheduled they are triggered , calling the user's callback function.

SEE ALSO

SoAlarmSensor, SoDataSensor, SoFieldSensor, SoIdleSensor, SoNodeSensor, SoPathSensor


Constructor & Destructor Documentation

SoSensor::SoSensor (  )  [inline]

Constructor.

SoSensor::SoSensor ( SoSensorCB f,
void *  d 
) [inline]

Constructor that takes standard callback function and data.


Member Function Documentation

void* SoSensor::getData (  )  const [inline]

Returns the user-supplied pointer that will be passed to the callback function.

SoSensorCB* SoSensor::getFunction (  )  const [inline]

Returns the callback that will be called when the sensor is triggered.

virtual SbBool SoSensor::isScheduled (  )  const [inline, virtual]

Returns TRUE if this sensor has been scheduled and is waiting in a sensor queue to be triggered.

Sensors are removed from the queue before their callback function is triggered.

virtual void SoSensor::schedule (  )  [pure virtual]
void SoSensor::setData ( void *  d  )  [inline]

Sets the callback data passed to the callback function.

void SoSensor::setFunction ( SoSensorCB f  )  [inline]

Sets the callback function that is called when the sensor is triggered.

The function must take two arguments - user-supplied callback data (of type void *) and a pointer to the sensor that is triggering the function (of type SoSensor *).

void SoSensor::setFunction ( SoSensorCB f,
void *  userData 
) [inline]
virtual void SoSensor::unschedule (  )  [pure virtual]

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

Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/