|
DooVR
|
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 | |
A class that handles vrpn connected devices.
| Device::Device | ( | bool | analog, |
| bool | button, | ||
| bool | tracker, | ||
| std::string | name | ||
| ) |
A Constructor.
Create the device class, connect vrpn callback functions.
1.8.9.1