OpenCOVER
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
opencover::InputDevice Class Reference

The InputDevice class interacts with input hardware. More...

#include <inputdevice.h>

Inheritance diagram for opencover::InputDevice:
Inheritance graph
[legend]
Collaboration diagram for opencover::InputDevice:
Collaboration graph
[legend]

Public Member Functions

 InputDevice (const std::string &configPath)
 
virtual ~InputDevice ()
 
std::string configPath (const std::string &ent="") const
 
virtual bool poll ()
 
virtual void run ()
 
virtual bool needsThread () const
 
void stopLoop ()
 
bool isValid () const
 
bool isVarying () const
 
bool is6Dof () const
 
const std::string & getName () const
 
const osg::Matrix & getOffsetMat () const
 
void setOffsetMat (const osg::Matrix &m)
 
std::string & getCalibrationPointName (int i)
 
osg::Vec3 & getCalibrationPoint (int i)
 

Protected Member Functions

size_t numButtons () const
 
bool getButtonState (size_t idx) const
 
size_t numValuators () const
 
double getValuatorValue (size_t idx) const
 
std::pair< double, double > getValuatorRange (size_t idx) const
 
size_t numBodies () const
 
bool isBodyMatrixValid (size_t idx) const
 
bool isBodyMatrixRelative (size_t idx) const
 
const osg::Matrix & getBodyMatrix (size_t idx) const
 
virtual void update ()
 

Protected Attributes

bool loop_is_running
 
OpenThreads::Mutex m_mutex
 If true, the main loop will run. More...
 
const std::string m_config
 
std::string m_name
 
osg::Matrix m_offsetMatrix
 
bool m_isVarying
 
bool m_is6Dof
 
bool m_valid
 
std::vector< bool > m_buttonStates
 
std::vector< double > m_valuatorValues
 
std::vector< std::pair< double, double > > m_valuatorRanges
 
std::vector< bool > m_bodyMatricesValid
 
std::vector< bool > m_bodyMatricesRelative
 
std::vector< osg::Matrix > m_bodyMatrices
 
osg::Vec3 m_calibrationPoints [3]
 
std::string m_calibrationPointNames [3]
 

Static Protected Attributes

static osg::Matrix s_identity
 

Friends

class Input
 
class ButtonDevice
 
class Valuator
 
class TrackingBody
 

Detailed Description

The InputDevice class interacts with input hardware.

This class interacts with input hardware and stores the data about all configured input hardware e.g. tracking systems, button devices etc.

Main interaction loop runs in its own thread

Constructor & Destructor Documentation

◆ InputDevice()

opencover::InputDevice::InputDevice ( const std::string &  configPath)

◆ ~InputDevice()

virtual opencover::InputDevice::~InputDevice ( )
virtual

Member Function Documentation

◆ configPath()

std::string opencover::InputDevice::configPath ( const std::string &  ent = "") const

◆ getBodyMatrix()

const osg::Matrix & opencover::InputDevice::getBodyMatrix ( size_t  idx) const
protected

◆ getButtonState()

bool opencover::InputDevice::getButtonState ( size_t  idx) const
protected

◆ getCalibrationPoint()

osg::Vec3 & opencover::InputDevice::getCalibrationPoint ( int  i)

◆ getCalibrationPointName()

std::string & opencover::InputDevice::getCalibrationPointName ( int  i)

◆ getName()

const std::string & opencover::InputDevice::getName ( ) const

◆ getOffsetMat()

const osg::Matrix & opencover::InputDevice::getOffsetMat ( ) const

◆ getValuatorRange()

std::pair< double, double > opencover::InputDevice::getValuatorRange ( size_t  idx) const
protected

◆ getValuatorValue()

double opencover::InputDevice::getValuatorValue ( size_t  idx) const
protected

◆ is6Dof()

bool opencover::InputDevice::is6Dof ( ) const

◆ isBodyMatrixRelative()

bool opencover::InputDevice::isBodyMatrixRelative ( size_t  idx) const
protected

◆ isBodyMatrixValid()

bool opencover::InputDevice::isBodyMatrixValid ( size_t  idx) const
protected

◆ isValid()

bool opencover::InputDevice::isValid ( ) const

◆ isVarying()

bool opencover::InputDevice::isVarying ( ) const

◆ needsThread()

virtual bool opencover::InputDevice::needsThread ( ) const
virtual

Reimplemented in opencover::ConstInputDevice.

◆ numBodies()

size_t opencover::InputDevice::numBodies ( ) const
inlineprotected

◆ numButtons()

size_t opencover::InputDevice::numButtons ( ) const
inlineprotected

◆ numValuators()

size_t opencover::InputDevice::numValuators ( ) const
inlineprotected

◆ poll()

virtual bool opencover::InputDevice::poll ( )
virtual

◆ run()

virtual void opencover::InputDevice::run ( )
virtual

◆ setOffsetMat()

void opencover::InputDevice::setOffsetMat ( const osg::Matrix &  m)

◆ stopLoop()

void opencover::InputDevice::stopLoop ( )

◆ update()

virtual void opencover::InputDevice::update ( )
protectedvirtual

Friends And Related Function Documentation

◆ ButtonDevice

friend class ButtonDevice
friend

◆ Input

friend class Input
friend

◆ TrackingBody

friend class TrackingBody
friend

◆ Valuator

friend class Valuator
friend

Member Data Documentation

◆ loop_is_running

bool opencover::InputDevice::loop_is_running
protected

◆ m_bodyMatrices

std::vector<osg::Matrix> opencover::InputDevice::m_bodyMatrices
protected

◆ m_bodyMatricesRelative

std::vector<bool> opencover::InputDevice::m_bodyMatricesRelative
protected

◆ m_bodyMatricesValid

std::vector<bool> opencover::InputDevice::m_bodyMatricesValid
protected

◆ m_buttonStates

std::vector<bool> opencover::InputDevice::m_buttonStates
protected

◆ m_calibrationPointNames

std::string opencover::InputDevice::m_calibrationPointNames[3]
protected

◆ m_calibrationPoints

osg::Vec3 opencover::InputDevice::m_calibrationPoints[3]
protected

◆ m_config

const std::string opencover::InputDevice::m_config
protected

◆ m_is6Dof

bool opencover::InputDevice::m_is6Dof
protected

◆ m_isVarying

bool opencover::InputDevice::m_isVarying
protected

◆ m_mutex

OpenThreads::Mutex opencover::InputDevice::m_mutex
protected

If true, the main loop will run.

◆ m_name

std::string opencover::InputDevice::m_name
protected

◆ m_offsetMatrix

osg::Matrix opencover::InputDevice::m_offsetMatrix
protected

◆ m_valid

bool opencover::InputDevice::m_valid
protected

◆ m_valuatorRanges

std::vector<std::pair<double, double> > opencover::InputDevice::m_valuatorRanges
protected

◆ m_valuatorValues

std::vector<double> opencover::InputDevice::m_valuatorValues
protected

◆ s_identity

osg::Matrix opencover::InputDevice::s_identity
staticprotected

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