Main Page | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

osgSensor::Sensor Class Reference

Abstract base class for all sensor devices. More...

#include <Sensor.h>

Inherited by osgHaptics::HapticDevice, osgSensor::DummySensor, and osgSensor::ThreadedSensor.

Inheritance diagram for osgSensor::Sensor:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual int read (unsigned int sensor_no, osg::Vec3 &p, osg::Quat &q, unsigned long timeout=2000)
 Returns the current sensor information for sensor_no.
virtual int read (osg::Vec3 &p, osg::Quat &q)
 Returns the sensor information.
virtual int read (osg::Matrix &matrix)
 Read the first sensor (or the only) and set the transformation matrix.
virtual unsigned int getNumberOfSensors ()=0
 Return the number of 6Dof sensors (if any).
virtual void update ()=0
 Update the internal state of the sensors. Usually means that data is read from the actual device.
virtual void shutdown ()=0
 Tell the device to shut down everything.
void setTimeout (unsigned int ms=5000)
 Set the timeout for reading from external device.
unsigned int getTimeout (unsigned int ms=5000) const
 REturn the timeout for reading from an external device.
void setName (const std::string &name)
 Set the name of this sensor.
std::string getName () const
 Return the name of this sensor.

Detailed Description

Abstract base class for all sensor devices.

6DOF and other devices can inherit from this class. update(), read(), getNumberOfSensors and shutdown() are methods that has to be implemented


The documentation for this class was generated from the following file:
Generated on Wed May 10 16:29:46 2006 for osgHaptics by  doxygen 1.4.4