summaryrefslogtreecommitdiffhomepage
path: root/tracker-steamvr/steamvr.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2016-12-28 06:31:05 +0100
committerStanislaw Halik <sthalik@misaki.pl>2016-12-28 06:31:05 +0100
commit4f390f6c8f5c58babd8bc9db13b12cc0b1949cae (patch)
treed64c8376209f254acedd5f09a807af3592af9b4a /tracker-steamvr/steamvr.hpp
parent9f163b82da3ddb08d312d5e935d9792225ac2c69 (diff)
tracker/steamvr: add untested geometry code
Diffstat (limited to 'tracker-steamvr/steamvr.hpp')
-rw-r--r--tracker-steamvr/steamvr.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tracker-steamvr/steamvr.hpp b/tracker-steamvr/steamvr.hpp
index 9b53979e..1adb40b1 100644
--- a/tracker-steamvr/steamvr.hpp
+++ b/tracker-steamvr/steamvr.hpp
@@ -4,6 +4,8 @@
#include "compat/util.hpp"
#include "options/options.hpp"
+#include "compat/euler.hpp"
+
#include <openvr.h>
#include <atomic>
@@ -16,6 +18,8 @@
using namespace options;
+using quat = Mat<float, 4, 1>;
+
struct settings : opts
{
settings() : opts("valve-steamvr") {}
@@ -29,12 +33,15 @@ public:
void start_tracker(QFrame *) override;
void data(double *data) override;
private:
+
using error_t = vr::EVRInitError;
using vr_t = vr::IVRSystem*;
vr_t vr;
settings s;
+
+ static quat get_quaternion(const vr::HmdMatrix34_t& r);
static void vr_deleter();
static vr_t vr_init(error_t& error);
static QString strerror(error_t error);