From 90a8561b596c5e6d6c26ca24e1226fa1d7fefb88 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 1 Apr 2017 07:50:03 +0200 Subject: tracker/steamvr: add center() override --- tracker-steamvr/steamvr.cpp | 7 +++++++ tracker-steamvr/steamvr.hpp | 1 + 2 files changed, 8 insertions(+) (limited to 'tracker-steamvr') diff --git a/tracker-steamvr/steamvr.cpp b/tracker-steamvr/steamvr.cpp index e40d51a1..2d92c5a4 100644 --- a/tracker-steamvr/steamvr.cpp +++ b/tracker-steamvr/steamvr.cpp @@ -147,6 +147,13 @@ void steamvr::data(double* data) } } +bool steamvr::center() +{ + if (vr) + vr->ResetSeatedZeroPose(); + return false; +} + void steamvr_dialog::register_tracker(ITracker*) {} void steamvr_dialog::unregister_tracker() {} diff --git a/tracker-steamvr/steamvr.hpp b/tracker-steamvr/steamvr.hpp index 5546d619..2842fda3 100644 --- a/tracker-steamvr/steamvr.hpp +++ b/tracker-steamvr/steamvr.hpp @@ -33,6 +33,7 @@ public: ~steamvr() override; void start_tracker(QFrame *) override; void data(double *data) override; + bool center() override; private: using error_t = vr::EVRInitError; -- cgit v1.2.3