DooVR
Public Member Functions | Public Attributes | List of all members
Device Class Reference

A class that handles vrpn connected devices. More...

#include <Device.h>

Public Member Functions

 Device (bool analog, bool button, bool tracker, std::string name)
 A Constructor. More...
 
 ~Device ()
 A destructor.
 
void sendtoMainloop ()
 Collects data from the vrpn server.
 
float * getTrackerPosition ()
 Get position vector of the device position.
 
float * getTrackerRotation ()
 Get the rotation matrix for the device.
 
float * getAnalogPosition ()
 Get analog position of the device.
 
bool getButtonState ()
 Get button state.
 
int getButtonNumber ()
 Get button number.
 
bool * getButton ()
 Get both button number and the state, replaces the 2 button functions from above.
 
void setTrackerPosition (float *t)
 Set position vector of the device position to a variable.
 
void setTrackerRotation (double *o)
 Set the rotation matrix for the device to a variable.
 
void setButtonState (bool b)
 Set button state to a variable.
 
void setButtonNumber (int b)
 Set button number to a variable.
 
void setButton (int n, bool b)
 Set button number and the state.
 
void setAnalogPosition (float *pos)
 Set analog position of the device to a variable.
 

Public Attributes

vrpn_Analog_Remote * vrpnAnalog = nullptr
 vrpn Analog tracker
 
vrpn_Button_Remote * vrpnButton = nullptr
 vrpn Button tracker
 
vrpn_Tracker_Remote * vrpnTracker = nullptr
 vrpn Position tracker
 

Detailed Description

A class that handles vrpn connected devices.

Constructor & Destructor Documentation

Device::Device ( bool  analog,
bool  button,
bool  tracker,
std::string  name 
)

A Constructor.

Create the device class, connect vrpn callback functions.


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