35 #ifndef VRPNTRACKERDEVICE_H
36 #define VRPNTRACKERDEVICE_H
39 #include <glm/glm.hpp>
40 #include <glm/gtc/matrix_access.hpp>
41 #include <glm/gtx/orthonormalize.hpp>
42 #include <glm/gtc/quaternion.hpp>
48 #include <boost/log/trivial.hpp>
49 #define BOOST_ASSERT_MSG_OSTREAM std::cout
50 #include <boost/assert.hpp>
53 class vrpn_Tracker_Remote;
54 class vrpn_Connection;
99 const std::string &vrpnTrackerDeviceName,
100 const std::vector<std::string> &eventsToGenerate,
101 const double &trackerUnitsToRoomUnitsScale,
102 const glm::mat4 &deviceToRoom,
103 const std::vector<glm::mat4> &propToTracker,
104 const std::vector<glm::mat4> &finalOffset,
105 const bool &waitForNewReportInPoll,
106 const bool &convertLHtoRH =
false,
107 const bool &ignoreZeroes =
false);
113 void processEvent(
const glm::mat4 &vrpnEvent,
int sensorNum);
114 std::string getEventName(
int trackerNumber);
116 void setPrintSensor0(
bool b) { _printSensor0 = b; }
119 vrpn_Connection *_vrpnConnection;
120 vrpn_Tracker_Remote *_vrpnDevice;
121 std::vector<std::string> _eventNames;
122 double _trackerUnitsToRoomUnitsScale;
123 glm::mat4 _deviceToRoom;
124 std::vector<glm::mat4> _propToTracker;
125 std::vector<glm::mat4> _finalOffset;
127 bool _waitForNewReport;
131 std::vector<EventRef> _pendingEvents;
134 const std::string &vrpnTrackerDeviceName,
135 const std::vector<std::string> &eventsToGenerate,
136 const double &trackerUnitsToRoomUnitsScale,
137 const glm::mat4 &deviceToRoom,
138 const std::vector<glm::mat4> &propToTracker,
139 const std::vector<glm::mat4> &finalOffset,
140 const bool &waitForNewReportInPoll,
141 const bool &convertLHtoRH =
false,
142 const bool &ignoreZeroes =
false)
144 BOOST_ASSERT_MSG(
false,
"VRPN is currently unsupported. Set cmake option USE_VRPN to ON and recompile.");
149 BOOST_ASSERT_MSG(
false,
"VRPN is currently unsupported. Set cmake option USE_VRPN to ON and recompile.");