From 3a9ae529a862a6ebfe66f05d7c676deedb7ff66d Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 6 Jul 2018 20:12:31 +0200 Subject: tracker/rift: euthanize old versions No one uses them according to #781 --- tracker-rift-025/CMakeLists.txt | 4 - tracker-rift-025/ftnoir_rift_025.qrc | 7 - tracker-rift-025/ftnoir_rift_clientcontrols_025.ui | 176 --------------------- tracker-rift-025/ftnoir_tracker_rift_025.cpp | 118 -------------- tracker-rift-025/ftnoir_tracker_rift_025.h | 66 -------- .../ftnoir_tracker_rift_dialog_025.cpp | 25 --- tracker-rift-025/images/medium.png | Bin 5764 -> 0 bytes tracker-rift-025/images/rift_medium.png | Bin 5764 -> 0 bytes tracker-rift-025/images/rift_small.png | Bin 1212 -> 0 bytes tracker-rift-025/images/rift_tiny.png | Bin 624 -> 0 bytes tracker-rift-025/images/small.png | Bin 1212 -> 0 bytes tracker-rift-025/images/tiny.png | Bin 624 -> 0 bytes tracker-rift-025/lang/nl_NL.ts | 53 ------- tracker-rift-025/lang/ru_RU.ts | 53 ------- tracker-rift-025/lang/stub.ts | 53 ------- tracker-rift-025/lang/zh_CN.ts | 53 ------- tracker-rift-042/CMakeLists.txt | 3 - tracker-rift-042/ftnoir_rift_042.qrc | 7 - tracker-rift-042/ftnoir_rift_clientcontrols_042.ui | 176 --------------------- tracker-rift-042/ftnoir_tracker_rift_042.cpp | 99 ------------ tracker-rift-042/ftnoir_tracker_rift_042.h | 63 -------- .../ftnoir_tracker_rift_dialog_042.cpp | 25 --- tracker-rift-042/images/medium.png | Bin 5764 -> 0 bytes tracker-rift-042/images/rift_medium.png | Bin 5764 -> 0 bytes tracker-rift-042/images/rift_small.png | Bin 1212 -> 0 bytes tracker-rift-042/images/rift_tiny.png | Bin 624 -> 0 bytes tracker-rift-042/images/small.png | Bin 1212 -> 0 bytes tracker-rift-042/images/tiny.png | Bin 624 -> 0 bytes tracker-rift-042/lang/nl_NL.ts | 45 ------ tracker-rift-042/lang/ru_RU.ts | 45 ------ tracker-rift-042/lang/stub.ts | 45 ------ tracker-rift-042/lang/zh_CN.ts | 45 ------ tracker-rift-080/CMakeLists.txt | 3 - tracker-rift-080/ftnoir_rift_080.qrc | 7 - tracker-rift-080/ftnoir_rift_clientcontrols_080.ui | 176 --------------------- tracker-rift-080/ftnoir_tracker_rift_080.cpp | 113 ------------- tracker-rift-080/ftnoir_tracker_rift_080.h | 60 ------- .../ftnoir_tracker_rift_dialog_080.cpp | 25 --- tracker-rift-080/images/medium.png | Bin 5764 -> 0 bytes tracker-rift-080/images/rift_medium.png | Bin 5764 -> 0 bytes tracker-rift-080/images/rift_small.png | Bin 1212 -> 0 bytes tracker-rift-080/images/rift_tiny.png | Bin 624 -> 0 bytes tracker-rift-080/images/small.png | Bin 1212 -> 0 bytes tracker-rift-080/images/tiny.png | Bin 624 -> 0 bytes tracker-rift-080/lang/nl_NL.ts | 38 ----- tracker-rift-080/lang/ru_RU.ts | 38 ----- tracker-rift-080/lang/stub.ts | 38 ----- tracker-rift-080/lang/zh_CN.ts | 38 ----- 48 files changed, 1697 deletions(-) delete mode 100644 tracker-rift-025/CMakeLists.txt delete mode 100644 tracker-rift-025/ftnoir_rift_025.qrc delete mode 100644 tracker-rift-025/ftnoir_rift_clientcontrols_025.ui delete mode 100644 tracker-rift-025/ftnoir_tracker_rift_025.cpp delete mode 100644 tracker-rift-025/ftnoir_tracker_rift_025.h delete mode 100644 tracker-rift-025/ftnoir_tracker_rift_dialog_025.cpp delete mode 100644 tracker-rift-025/images/medium.png delete mode 100644 tracker-rift-025/images/rift_medium.png delete mode 100644 tracker-rift-025/images/rift_small.png delete mode 100644 tracker-rift-025/images/rift_tiny.png delete mode 100644 tracker-rift-025/images/small.png delete mode 100644 tracker-rift-025/images/tiny.png delete mode 100644 tracker-rift-025/lang/nl_NL.ts delete mode 100644 tracker-rift-025/lang/ru_RU.ts delete mode 100644 tracker-rift-025/lang/stub.ts delete mode 100644 tracker-rift-025/lang/zh_CN.ts delete mode 100644 tracker-rift-042/CMakeLists.txt delete mode 100644 tracker-rift-042/ftnoir_rift_042.qrc delete mode 100644 tracker-rift-042/ftnoir_rift_clientcontrols_042.ui delete mode 100644 tracker-rift-042/ftnoir_tracker_rift_042.cpp delete mode 100644 tracker-rift-042/ftnoir_tracker_rift_042.h delete mode 100644 tracker-rift-042/ftnoir_tracker_rift_dialog_042.cpp delete mode 100644 tracker-rift-042/images/medium.png delete mode 100644 tracker-rift-042/images/rift_medium.png delete mode 100644 tracker-rift-042/images/rift_small.png delete mode 100644 tracker-rift-042/images/rift_tiny.png delete mode 100644 tracker-rift-042/images/small.png delete mode 100644 tracker-rift-042/images/tiny.png delete mode 100644 tracker-rift-042/lang/nl_NL.ts delete mode 100644 tracker-rift-042/lang/ru_RU.ts delete mode 100644 tracker-rift-042/lang/stub.ts delete mode 100644 tracker-rift-042/lang/zh_CN.ts delete mode 100644 tracker-rift-080/CMakeLists.txt delete mode 100644 tracker-rift-080/ftnoir_rift_080.qrc delete mode 100644 tracker-rift-080/ftnoir_rift_clientcontrols_080.ui delete mode 100644 tracker-rift-080/ftnoir_tracker_rift_080.cpp delete mode 100644 tracker-rift-080/ftnoir_tracker_rift_080.h delete mode 100644 tracker-rift-080/ftnoir_tracker_rift_dialog_080.cpp delete mode 100644 tracker-rift-080/images/medium.png delete mode 100644 tracker-rift-080/images/rift_medium.png delete mode 100644 tracker-rift-080/images/rift_small.png delete mode 100644 tracker-rift-080/images/rift_tiny.png delete mode 100644 tracker-rift-080/images/small.png delete mode 100644 tracker-rift-080/images/tiny.png delete mode 100644 tracker-rift-080/lang/nl_NL.ts delete mode 100644 tracker-rift-080/lang/ru_RU.ts delete mode 100644 tracker-rift-080/lang/stub.ts delete mode 100644 tracker-rift-080/lang/zh_CN.ts diff --git a/tracker-rift-025/CMakeLists.txt b/tracker-rift-025/CMakeLists.txt deleted file mode 100644 index 36d3f08f..00000000 --- a/tracker-rift-025/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -include(opentrack-rift) -otr_rift(tracker-rift-025 SDK_RIFT_025) -SET(SDK_RIFT_025 "" CACHE PATH "libOVR 0.2.5 path for Oculus Rift") - diff --git a/tracker-rift-025/ftnoir_rift_025.qrc b/tracker-rift-025/ftnoir_rift_025.qrc deleted file mode 100644 index cd174fc4..00000000 --- a/tracker-rift-025/ftnoir_rift_025.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - images/rift_medium.png - images/rift_small.png - images/rift_tiny.png - - diff --git a/tracker-rift-025/ftnoir_rift_clientcontrols_025.ui b/tracker-rift-025/ftnoir_rift_clientcontrols_025.ui deleted file mode 100644 index 71918a71..00000000 --- a/tracker-rift-025/ftnoir_rift_clientcontrols_025.ui +++ /dev/null @@ -1,176 +0,0 @@ - - - dialog_rift_025 - - - Qt::NonModal - - - - 0 - 0 - 218 - 200 - - - - - 0 - 0 - - - - Oculus Rift tracker settings FaceTrackNoIR - - - - images/opentrack.pngimages/opentrack.png - - - Qt::LeftToRight - - - false - - - - - - Yaw spring - - - - - - Enable - - - - - - - Persistence - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - 5 - - - 0.900000000000000 - - - 1.000000000000000 - - - 0.001000000000000 - - - - - - - Constant drift - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - 5 - - - 0.000100000000000 - - - 0.100000000000000 - - - 0.001000000000000 - - - - - - - Deadzone - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - 5 - - - 0.100000000000000 - - - 0.010000000000000 - - - - - - - - - - - 0 - 0 - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - startEngineClicked() - stopEngineClicked() - cameraSettingsClicked() - - diff --git a/tracker-rift-025/ftnoir_tracker_rift_025.cpp b/tracker-rift-025/ftnoir_tracker_rift_025.cpp deleted file mode 100644 index 8d4a6e8a..00000000 --- a/tracker-rift-025/ftnoir_tracker_rift_025.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (c) 2013 mm0zct - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include "ftnoir_tracker_rift_025.h" -#include "api/plugin-api.hpp" -#include -#include -#include - - -using namespace OVR; - -rift_tracker_025::rift_tracker_025() -{ - pManager = NULL; - pSensor = NULL; - pSFusion = NULL; - old_yaw = 0; -} - -rift_tracker_025::~rift_tracker_025() -{ - if (pSensor) - pSensor->Release(); - if (pSFusion) - delete pSFusion; - if (pManager) - pManager->Release(); - System::Destroy(); -} - -module_status rift_tracker_025::start_tracker(QFrame*) -{ - QString err; - - System::Init(Log::ConfigureDefaultLog(LogMask_All)); - pManager = DeviceManager::Create(); - if (pManager != NULL) - { - DeviceEnumerator enumerator = pManager->EnumerateDevices(); - if (enumerator.IsAvailable()) - { - pSensor = enumerator.CreateDevice(); - - if (pSensor) - { - pSFusion = new OVR::SensorFusion(); - pSFusion->Reset(); - pSFusion->AttachToSensor(pSensor); - } - else - err = tr("Unable to create Rift sensor"); - - } - else - err = tr("Unable to enumerate Rift tracker"); - } - else - err = tr("Unable to start Rift tracker"); - - if (err.isEmpty()) - return status_ok(); - else - return error(err); -} - - -void rift_tracker_025::data(double *data) -{ - if (pSFusion != NULL && pSensor != NULL) - { - Quatf rot = pSFusion->GetOrientation(); - - constexpr float c_mult = 8; - constexpr float c_div = 1/c_mult; - - Vector3f axis; - float angle; - - rot.GetAxisAngle(&axis, &angle); - angle *= c_div; - - float yaw, pitch, roll; - Quatf(axis, angle).GetEulerAngles(&yaw, &pitch, &roll); - - double yaw_ = double(yaw); - - if (s.useYawSpring) - { - yaw_ = old_yaw*s.persistence + (yaw_-old_yaw); - if (yaw_ > s.deadzone) - yaw_ -= s.constant_drift; - if (yaw_ < -s.deadzone) - yaw_ += s.constant_drift; - old_yaw = yaw_; - } - - constexpr double r2d = 180 / M_PI; - - data[Yaw] = yaw_ * r2d; - data[Pitch] = double(pitch) * r2d; - data[Roll] = double(roll) * r2d; - } -} - -OPENTRACK_DECLARE_TRACKER(rift_tracker_025, dialog_rift_025, rift_025Dll) diff --git a/tracker-rift-025/ftnoir_tracker_rift_025.h b/tracker-rift-025/ftnoir_tracker_rift_025.h deleted file mode 100644 index 18b3cb8d..00000000 --- a/tracker-rift-025/ftnoir_tracker_rift_025.h +++ /dev/null @@ -1,66 +0,0 @@ -#pragma once -#include "ui_ftnoir_rift_clientcontrols_025.h" -#include "api/plugin-api.hpp" -#include "options/options.hpp" -#include -#include -#include -#include -#include -using namespace options; - -struct settings : opts { - value useYawSpring; - value constant_drift, persistence, deadzone; - settings() : - opts("Rift-025"), - useYawSpring(b, "yaw-spring", false), - constant_drift(b, "constant-drift", 0.000005), - persistence(b, "persistence", 0.99999), - deadzone(b, "deadzone", 0.02) - {} -}; - -class rift_tracker_025 : public QObject, public ITracker -{ - Q_OBJECT - -public: - rift_tracker_025(); - virtual ~rift_tracker_025() override; - module_status start_tracker(QFrame *) override; - void data(double *data) override; -private: - double old_yaw; - settings s; - static bool isInitialised; - OVR::DeviceManager* pManager; - OVR::SensorDevice* pSensor; - OVR::SensorFusion* pSFusion; -}; - -class dialog_rift_025: public ITrackerDialog -{ - Q_OBJECT -public: - dialog_rift_025(); - - void register_tracker(ITracker *) {} - void unregister_tracker() {} - -private: - Ui::dialog_rift_025 ui; - settings s; -private slots: - void doOK(); - void doCancel(); -}; - -class rift_025Dll : public Metadata -{ - Q_OBJECT - - QString name() { return tr("Oculus Rift runtime 0.2.5 -- HMD"); } - QIcon icon() { return QIcon(":/images/rift_tiny.png"); } -}; - diff --git a/tracker-rift-025/ftnoir_tracker_rift_dialog_025.cpp b/tracker-rift-025/ftnoir_tracker_rift_dialog_025.cpp deleted file mode 100644 index 010fc699..00000000 --- a/tracker-rift-025/ftnoir_tracker_rift_dialog_025.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "ftnoir_tracker_rift_025.h" -#include "api/plugin-api.hpp" - -dialog_rift_025::dialog_rift_025() -{ - ui.setupUi( this ); - - connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); - connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); - - tie_setting(s.constant_drift, ui.constantDrift); - tie_setting(s.deadzone, ui.deadzone); - tie_setting(s.persistence, ui.persistence); - tie_setting(s.useYawSpring, ui.yawSpring); -} - -void dialog_rift_025::doOK() { - s.b->save(); - close(); -} - -void dialog_rift_025::doCancel() { - close(); -} - diff --git a/tracker-rift-025/images/medium.png b/tracker-rift-025/images/medium.png deleted file mode 100644 index a5ba49e7..00000000 Binary files a/tracker-rift-025/images/medium.png and /dev/null differ diff --git a/tracker-rift-025/images/rift_medium.png b/tracker-rift-025/images/rift_medium.png deleted file mode 100644 index a5ba49e7..00000000 Binary files a/tracker-rift-025/images/rift_medium.png and /dev/null differ diff --git a/tracker-rift-025/images/rift_small.png b/tracker-rift-025/images/rift_small.png deleted file mode 100644 index 3f18080c..00000000 Binary files a/tracker-rift-025/images/rift_small.png and /dev/null differ diff --git a/tracker-rift-025/images/rift_tiny.png b/tracker-rift-025/images/rift_tiny.png deleted file mode 100644 index 76fe0f58..00000000 Binary files a/tracker-rift-025/images/rift_tiny.png and /dev/null differ diff --git a/tracker-rift-025/images/small.png b/tracker-rift-025/images/small.png deleted file mode 100644 index 3f18080c..00000000 Binary files a/tracker-rift-025/images/small.png and /dev/null differ diff --git a/tracker-rift-025/images/tiny.png b/tracker-rift-025/images/tiny.png deleted file mode 100644 index 76fe0f58..00000000 Binary files a/tracker-rift-025/images/tiny.png and /dev/null differ diff --git a/tracker-rift-025/lang/nl_NL.ts b/tracker-rift-025/lang/nl_NL.ts deleted file mode 100644 index 572e2e64..00000000 --- a/tracker-rift-025/lang/nl_NL.ts +++ /dev/null @@ -1,53 +0,0 @@ - - - - - dialog_rift_025 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_025Dll - - Oculus Rift runtime 0.2.5 -- HMD - - - - - rift_tracker_025 - - Unable to create Rift sensor - - - - Unable to enumerate Rift tracker - - - - Unable to start Rift tracker - - - - diff --git a/tracker-rift-025/lang/ru_RU.ts b/tracker-rift-025/lang/ru_RU.ts deleted file mode 100644 index c295eb64..00000000 --- a/tracker-rift-025/lang/ru_RU.ts +++ /dev/null @@ -1,53 +0,0 @@ - - - - - dialog_rift_025 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_025Dll - - Oculus Rift runtime 0.2.5 -- HMD - - - - - rift_tracker_025 - - Unable to create Rift sensor - - - - Unable to enumerate Rift tracker - - - - Unable to start Rift tracker - - - - diff --git a/tracker-rift-025/lang/stub.ts b/tracker-rift-025/lang/stub.ts deleted file mode 100644 index 1f5fae82..00000000 --- a/tracker-rift-025/lang/stub.ts +++ /dev/null @@ -1,53 +0,0 @@ - - - - - dialog_rift_025 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_025Dll - - Oculus Rift runtime 0.2.5 -- HMD - - - - - rift_tracker_025 - - Unable to create Rift sensor - - - - Unable to enumerate Rift tracker - - - - Unable to start Rift tracker - - - - diff --git a/tracker-rift-025/lang/zh_CN.ts b/tracker-rift-025/lang/zh_CN.ts deleted file mode 100644 index 1f5fae82..00000000 --- a/tracker-rift-025/lang/zh_CN.ts +++ /dev/null @@ -1,53 +0,0 @@ - - - - - dialog_rift_025 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_025Dll - - Oculus Rift runtime 0.2.5 -- HMD - - - - - rift_tracker_025 - - Unable to create Rift sensor - - - - Unable to enumerate Rift tracker - - - - Unable to start Rift tracker - - - - diff --git a/tracker-rift-042/CMakeLists.txt b/tracker-rift-042/CMakeLists.txt deleted file mode 100644 index 594e7c5c..00000000 --- a/tracker-rift-042/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -include(opentrack-rift) -otr_rift(tracker-rift-042 SDK_RIFT_042) -SET(SDK_RIFT_042 "" CACHE PATH "libOVR 0.4.2 path for Oculus Rift") diff --git a/tracker-rift-042/ftnoir_rift_042.qrc b/tracker-rift-042/ftnoir_rift_042.qrc deleted file mode 100644 index cd174fc4..00000000 --- a/tracker-rift-042/ftnoir_rift_042.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - images/rift_medium.png - images/rift_small.png - images/rift_tiny.png - - diff --git a/tracker-rift-042/ftnoir_rift_clientcontrols_042.ui b/tracker-rift-042/ftnoir_rift_clientcontrols_042.ui deleted file mode 100644 index 102e16b2..00000000 --- a/tracker-rift-042/ftnoir_rift_clientcontrols_042.ui +++ /dev/null @@ -1,176 +0,0 @@ - - - dialog_rift_042 - - - Qt::NonModal - - - - 0 - 0 - 218 - 200 - - - - - 0 - 0 - - - - Oculus Rift tracker settings FaceTrackNoIR - - - - images/opentrack.pngimages/opentrack.png - - - Qt::LeftToRight - - - false - - - - - - Yaw spring - - - - - - Enable - - - - - - - Persistence - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - 5 - - - 0.900000000000000 - - - 1.000000000000000 - - - 0.001000000000000 - - - - - - - Constant drift - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - 5 - - - 0.000100000000000 - - - 0.100000000000000 - - - 0.001000000000000 - - - - - - - Deadzone - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - 5 - - - 0.100000000000000 - - - 0.010000000000000 - - - - - - - - - - - 0 - 0 - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - startEngineClicked() - stopEngineClicked() - cameraSettingsClicked() - - diff --git a/tracker-rift-042/ftnoir_tracker_rift_042.cpp b/tracker-rift-042/ftnoir_tracker_rift_042.cpp deleted file mode 100644 index c8ced38f..00000000 --- a/tracker-rift-042/ftnoir_tracker_rift_042.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (c) 2013 mm0zct - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include "ftnoir_tracker_rift_042.h" -#include "api/plugin-api.hpp" - -#include - -#include -#include -#include -#include -#include - -using namespace OVR; - -rift_tracker_042::rift_tracker_042() : old_yaw(0), hmd(nullptr) -{ -} - -rift_tracker_042::~rift_tracker_042() -{ - ovrHmd_Destroy(hmd); - ovr_Shutdown(); -} - -module_status rift_tracker_042::start_tracker(QFrame*) -{ - ovr_Initialize(); - hmd = ovrHmd_Create(0); - if (hmd) - { - ovrHmd_ConfigureTracking(hmd, ovrTrackingCap_Orientation | ovrTrackingCap_MagYawCorrection | ovrTrackingCap_Position, ovrTrackingCap_Orientation); - return status_ok(); - } - else - return error(tr("Unable to start Rift tracker: %1").arg(ovrHmd_GetLastError(nullptr))); -} - - -void rift_tracker_042::data(double *data) -{ - if (hmd) - { - ovrHSWDisplayState hsw; - std::memset(&hsw, 0, sizeof(hsw)); - ovrHmd_GetHSWDisplayState(hmd, &hsw); - if (hsw.Displayed) - ovrHmd_DismissHSWDisplay(hmd); - ovrTrackingState ss = ovrHmd_GetTrackingState(hmd, 0); - if (ss.StatusFlags & ovrStatus_OrientationTracked) - { - constexpr float c_mult = 16; - constexpr float c_div = 1/c_mult; - - Vector3f axis; - float angle; - - const Posef pose(ss.HeadPose.ThePose); - pose.Rotation.GetAxisAngle(&axis, &angle); - angle *= c_div; - - float yaw, pitch, roll; - Quatf(axis, angle).GetEulerAngles(&yaw, &pitch, &roll); - - double yaw_ = double(yaw); - if (s.useYawSpring) - { - yaw_ = old_yaw*s.persistence + (yaw_ - old_yaw); - if (yaw_ > s.deadzone) - yaw_ -= s.constant_drift; - if (yaw_ < -s.deadzone) - yaw_ += s.constant_drift; - old_yaw = yaw_; - } - constexpr double d2r = 180 / M_PI; - data[Yaw] = yaw_ * -d2r; - data[Pitch] = double(pitch) * d2r; - data[Roll] = double(roll) * d2r; - data[TX] = double(pose.Translation.x) * -1e2; - data[TY] = double(pose.Translation.y) * 1e2; - data[TZ] = double(pose.Translation.z) * 1e2; - } - } -} - -OPENTRACK_DECLARE_TRACKER(rift_tracker_042, dialog_rift_042, rift_042Dll) diff --git a/tracker-rift-042/ftnoir_tracker_rift_042.h b/tracker-rift-042/ftnoir_tracker_rift_042.h deleted file mode 100644 index b620a76c..00000000 --- a/tracker-rift-042/ftnoir_tracker_rift_042.h +++ /dev/null @@ -1,63 +0,0 @@ -#pragma once -#include "ui_ftnoir_rift_clientcontrols_042.h" -#include "api/plugin-api.hpp" -#include "options/options.hpp" -#include -#include -#include -#include -#include -using namespace options; - -struct settings : opts { - value useYawSpring; - value constant_drift, persistence, deadzone; - settings() : - opts("Rift-042"), - useYawSpring(b, "yaw-spring", false), - constant_drift(b, "constant-drift", 0.000005), - persistence(b, "persistence", 0.99999), - deadzone(b, "deadzone", 0.02) - {} -}; - -class rift_tracker_042 : public QObject, public ITracker -{ - Q_OBJECT - -public: - rift_tracker_042(); - virtual ~rift_tracker_042() override; - module_status start_tracker(QFrame *) override; - void data(double *data) override; -private: - double old_yaw; - ovrHmd hmd; - settings s; -}; - -class dialog_rift_042: public ITrackerDialog -{ - Q_OBJECT -public: - dialog_rift_042(); - - void register_tracker(ITracker *) {} - void unregister_tracker() {} - -private: - Ui::dialog_rift_042 ui; - settings s; -private slots: - void doOK(); - void doCancel(); -}; - -class rift_042Dll : public Metadata -{ - Q_OBJECT - - QString name() { return tr("Oculus Rift runtime 0.4.2 -- HMD"); } - QIcon icon() { return QIcon(":/images/rift_tiny.png"); } -}; - diff --git a/tracker-rift-042/ftnoir_tracker_rift_dialog_042.cpp b/tracker-rift-042/ftnoir_tracker_rift_dialog_042.cpp deleted file mode 100644 index 032c3c63..00000000 --- a/tracker-rift-042/ftnoir_tracker_rift_dialog_042.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "ftnoir_tracker_rift_042.h" -#include "api/plugin-api.hpp" - -dialog_rift_042::dialog_rift_042() -{ - ui.setupUi( this ); - - connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); - connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); - - tie_setting(s.constant_drift, ui.constantDrift); - tie_setting(s.deadzone, ui.deadzone); - tie_setting(s.persistence, ui.persistence); - tie_setting(s.useYawSpring, ui.yawSpring); -} - -void dialog_rift_042::doOK() { - s.b->save(); - close(); -} - -void dialog_rift_042::doCancel() { - close(); -} - diff --git a/tracker-rift-042/images/medium.png b/tracker-rift-042/images/medium.png deleted file mode 100644 index a5ba49e7..00000000 Binary files a/tracker-rift-042/images/medium.png and /dev/null differ diff --git a/tracker-rift-042/images/rift_medium.png b/tracker-rift-042/images/rift_medium.png deleted file mode 100644 index a5ba49e7..00000000 Binary files a/tracker-rift-042/images/rift_medium.png and /dev/null differ diff --git a/tracker-rift-042/images/rift_small.png b/tracker-rift-042/images/rift_small.png deleted file mode 100644 index 3f18080c..00000000 Binary files a/tracker-rift-042/images/rift_small.png and /dev/null differ diff --git a/tracker-rift-042/images/rift_tiny.png b/tracker-rift-042/images/rift_tiny.png deleted file mode 100644 index 76fe0f58..00000000 Binary files a/tracker-rift-042/images/rift_tiny.png and /dev/null differ diff --git a/tracker-rift-042/images/small.png b/tracker-rift-042/images/small.png deleted file mode 100644 index 3f18080c..00000000 Binary files a/tracker-rift-042/images/small.png and /dev/null differ diff --git a/tracker-rift-042/images/tiny.png b/tracker-rift-042/images/tiny.png deleted file mode 100644 index 76fe0f58..00000000 Binary files a/tracker-rift-042/images/tiny.png and /dev/null differ diff --git a/tracker-rift-042/lang/nl_NL.ts b/tracker-rift-042/lang/nl_NL.ts deleted file mode 100644 index 985e5faa..00000000 --- a/tracker-rift-042/lang/nl_NL.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - dialog_rift_042 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_042Dll - - Oculus Rift runtime 0.4.2 -- HMD - - - - - rift_tracker_042 - - Unable to start Rift tracker: %1 - - - - diff --git a/tracker-rift-042/lang/ru_RU.ts b/tracker-rift-042/lang/ru_RU.ts deleted file mode 100644 index 331a632c..00000000 --- a/tracker-rift-042/lang/ru_RU.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - dialog_rift_042 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_042Dll - - Oculus Rift runtime 0.4.2 -- HMD - - - - - rift_tracker_042 - - Unable to start Rift tracker: %1 - - - - diff --git a/tracker-rift-042/lang/stub.ts b/tracker-rift-042/lang/stub.ts deleted file mode 100644 index 67d1ce36..00000000 --- a/tracker-rift-042/lang/stub.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - dialog_rift_042 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_042Dll - - Oculus Rift runtime 0.4.2 -- HMD - - - - - rift_tracker_042 - - Unable to start Rift tracker: %1 - - - - diff --git a/tracker-rift-042/lang/zh_CN.ts b/tracker-rift-042/lang/zh_CN.ts deleted file mode 100644 index 67d1ce36..00000000 --- a/tracker-rift-042/lang/zh_CN.ts +++ /dev/null @@ -1,45 +0,0 @@ - - - - - dialog_rift_042 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_042Dll - - Oculus Rift runtime 0.4.2 -- HMD - - - - - rift_tracker_042 - - Unable to start Rift tracker: %1 - - - - diff --git a/tracker-rift-080/CMakeLists.txt b/tracker-rift-080/CMakeLists.txt deleted file mode 100644 index 2d89e442..00000000 --- a/tracker-rift-080/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -include(opentrack-rift) -otr_rift(tracker-rift-080 SDK_RIFT_080) -SET(SDK_RIFT_080 "" CACHE PATH "libOVR 0.8.0 path for Oculus Rift") diff --git a/tracker-rift-080/ftnoir_rift_080.qrc b/tracker-rift-080/ftnoir_rift_080.qrc deleted file mode 100644 index cd174fc4..00000000 --- a/tracker-rift-080/ftnoir_rift_080.qrc +++ /dev/null @@ -1,7 +0,0 @@ - - - images/rift_medium.png - images/rift_small.png - images/rift_tiny.png - - diff --git a/tracker-rift-080/ftnoir_rift_clientcontrols_080.ui b/tracker-rift-080/ftnoir_rift_clientcontrols_080.ui deleted file mode 100644 index cfc1b59f..00000000 --- a/tracker-rift-080/ftnoir_rift_clientcontrols_080.ui +++ /dev/null @@ -1,176 +0,0 @@ - - - dialog_rift_080 - - - Qt::NonModal - - - - 0 - 0 - 218 - 200 - - - - - 0 - 0 - - - - Oculus Rift tracker settings FaceTrackNoIR - - - - images/opentrack.pngimages/opentrack.png - - - Qt::LeftToRight - - - false - - - - - - Yaw spring - - - - - - Enable - - - - - - - Persistence - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - 5 - - - 0.900000000000000 - - - 1.000000000000000 - - - 0.001000000000000 - - - - - - - Constant drift - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - 5 - - - 0.000100000000000 - - - 0.100000000000000 - - - 0.001000000000000 - - - - - - - Deadzone - - - - - - - - 0 - 0 - - - - - 0 - 23 - - - - 5 - - - 0.100000000000000 - - - 0.010000000000000 - - - - - - - - - - - 0 - 0 - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - startEngineClicked() - stopEngineClicked() - cameraSettingsClicked() - - diff --git a/tracker-rift-080/ftnoir_tracker_rift_080.cpp b/tracker-rift-080/ftnoir_tracker_rift_080.cpp deleted file mode 100644 index 896ad8ef..00000000 --- a/tracker-rift-080/ftnoir_tracker_rift_080.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2013 mm0zct - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#include "ftnoir_tracker_rift_080.h" -#include "api/plugin-api.hpp" - -#include - -#include -#include - -using namespace OVR; - -rift_tracker_080::rift_tracker_080() : old_yaw(0), hmd(nullptr) -{ -} - -rift_tracker_080::~rift_tracker_080() -{ - if (hmd) - ovr_Destroy(hmd); - ovr_Shutdown(); -} - -module_status rift_tracker_080::start_tracker(QFrame*) -{ - ovrResult code; - ovrGraphicsLuid luid = {{0}}; - - code = ovr_Initialize(nullptr); - if (!OVR_SUCCESS(code)) - goto error; - - code = ovr_Create(&hmd, &luid); - if (!OVR_SUCCESS(code)) - goto error; - - ovr_ConfigureTracking(hmd, - ovrTrackingCap_Orientation | ovrTrackingCap_MagYawCorrection | ovrTrackingCap_Position, - ovrTrackingCap_Orientation); - - return status_ok(); -error: - ovrErrorInfo err; - err.Result = code; - err.ErrorString[0] = '\0'; - ovr_GetLastErrorInfo(&err); - - QString error_string(err.ErrorString); - if (error_string.size() == 0) - error_string = "Unknown reason"; - - return error(error_string); -} - -void rift_tracker_080::data(double *data) -{ - if (hmd) - { - ovrTrackingState ss = ovr_GetTrackingState(hmd, 0, false); - if (ss.StatusFlags & ovrStatus_OrientationTracked) - { - constexpr float c_mult = 16; - constexpr float c_div = 1/c_mult; - - Vector3f axis; - float angle; - - const Posef pose(ss.HeadPose.ThePose); - pose.Rotation.GetAxisAngle(&axis, &angle); - angle *= c_div; - - float yaw, pitch, roll; - Quatf(axis, angle).GetYawPitchRoll(&yaw, &pitch, &roll); - - yaw *= c_mult; - pitch *= c_mult; - roll *= c_mult; - - double yaw_ = double(yaw); - if (s.useYawSpring) - { - yaw_ = old_yaw*s.persistence + (yaw_-old_yaw); - if(yaw_ > s.deadzone) - yaw_ -= s.constant_drift; - if(yaw_ < -s.deadzone) - yaw_ += s.constant_drift; - old_yaw = yaw_; - } - constexpr double d2r = 180 / M_PI; - data[Yaw] = yaw_ * -d2r; - data[Pitch] = double(pitch) * d2r; - data[Roll] = double(roll) * d2r; - data[TX] = double(pose.Translation.x) * -1e2; - data[TY] = double(pose.Translation.y) * 1e2; - data[TZ] = double(pose.Translation.z) * 1e2; - } - } -} - -OPENTRACK_DECLARE_TRACKER(rift_tracker_080, dialog_rift_080, rift_080Dll) diff --git a/tracker-rift-080/ftnoir_tracker_rift_080.h b/tracker-rift-080/ftnoir_tracker_rift_080.h deleted file mode 100644 index bcdd8c25..00000000 --- a/tracker-rift-080/ftnoir_tracker_rift_080.h +++ /dev/null @@ -1,60 +0,0 @@ -#pragma once -#include "ui_ftnoir_rift_clientcontrols_080.h" -#include "api/plugin-api.hpp" -#include "options/options.hpp" -#include -#include -#include -#include -using namespace options; - -struct settings : opts { - value useYawSpring; - value constant_drift, persistence, deadzone; - settings() : - opts("Rift-080"), - useYawSpring(b, "yaw-spring", false), - constant_drift(b, "constant-drift", 0.000005), - persistence(b, "persistence", 0.99999), - deadzone(b, "deadzone", 0.02) - {} -}; - -class rift_tracker_080 : public ITracker -{ -public: - rift_tracker_080(); - ~rift_tracker_080() override; - module_status start_tracker(QFrame *) override; - void data(double *data) override; -private: - double old_yaw; - ovrSession hmd; - settings s; -}; - -class dialog_rift_080: public ITrackerDialog -{ - Q_OBJECT -public: - dialog_rift_080(); - - void register_tracker(ITracker *) {} - void unregister_tracker() {} - -private: - Ui::dialog_rift_080 ui; - settings s; -private slots: - void doOK(); - void doCancel(); -}; - -class rift_080Dll : public Metadata -{ - Q_OBJECT - - QString name() { return tr("Oculus Rift runtime 0.8.0 -- HMD"); } - QIcon icon() { return QIcon(":/images/rift_tiny.png"); } -}; - diff --git a/tracker-rift-080/ftnoir_tracker_rift_dialog_080.cpp b/tracker-rift-080/ftnoir_tracker_rift_dialog_080.cpp deleted file mode 100644 index 27eb54e4..00000000 --- a/tracker-rift-080/ftnoir_tracker_rift_dialog_080.cpp +++ /dev/null @@ -1,25 +0,0 @@ -#include "ftnoir_tracker_rift_080.h" -#include "api/plugin-api.hpp" - -dialog_rift_080::dialog_rift_080() -{ - ui.setupUi( this ); - - connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); - connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); - - tie_setting(s.constant_drift, ui.constantDrift); - tie_setting(s.deadzone, ui.deadzone); - tie_setting(s.persistence, ui.persistence); - tie_setting(s.useYawSpring, ui.yawSpring); -} - -void dialog_rift_080::doOK() { - s.b->save(); - close(); -} - -void dialog_rift_080::doCancel() { - close(); -} - diff --git a/tracker-rift-080/images/medium.png b/tracker-rift-080/images/medium.png deleted file mode 100644 index a5ba49e7..00000000 Binary files a/tracker-rift-080/images/medium.png and /dev/null differ diff --git a/tracker-rift-080/images/rift_medium.png b/tracker-rift-080/images/rift_medium.png deleted file mode 100644 index a5ba49e7..00000000 Binary files a/tracker-rift-080/images/rift_medium.png and /dev/null differ diff --git a/tracker-rift-080/images/rift_small.png b/tracker-rift-080/images/rift_small.png deleted file mode 100644 index 3f18080c..00000000 Binary files a/tracker-rift-080/images/rift_small.png and /dev/null differ diff --git a/tracker-rift-080/images/rift_tiny.png b/tracker-rift-080/images/rift_tiny.png deleted file mode 100644 index 76fe0f58..00000000 Binary files a/tracker-rift-080/images/rift_tiny.png and /dev/null differ diff --git a/tracker-rift-080/images/small.png b/tracker-rift-080/images/small.png deleted file mode 100644 index 3f18080c..00000000 Binary files a/tracker-rift-080/images/small.png and /dev/null differ diff --git a/tracker-rift-080/images/tiny.png b/tracker-rift-080/images/tiny.png deleted file mode 100644 index 76fe0f58..00000000 Binary files a/tracker-rift-080/images/tiny.png and /dev/null differ diff --git a/tracker-rift-080/lang/nl_NL.ts b/tracker-rift-080/lang/nl_NL.ts deleted file mode 100644 index 47da2415..00000000 --- a/tracker-rift-080/lang/nl_NL.ts +++ /dev/null @@ -1,38 +0,0 @@ - - - - - dialog_rift_080 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_080Dll - - Oculus Rift runtime 0.8.0 -- HMD - - - - diff --git a/tracker-rift-080/lang/ru_RU.ts b/tracker-rift-080/lang/ru_RU.ts deleted file mode 100644 index c93087f5..00000000 --- a/tracker-rift-080/lang/ru_RU.ts +++ /dev/null @@ -1,38 +0,0 @@ - - - - - dialog_rift_080 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_080Dll - - Oculus Rift runtime 0.8.0 -- HMD - - - - diff --git a/tracker-rift-080/lang/stub.ts b/tracker-rift-080/lang/stub.ts deleted file mode 100644 index e0f8db04..00000000 --- a/tracker-rift-080/lang/stub.ts +++ /dev/null @@ -1,38 +0,0 @@ - - - - - dialog_rift_080 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_080Dll - - Oculus Rift runtime 0.8.0 -- HMD - - - - diff --git a/tracker-rift-080/lang/zh_CN.ts b/tracker-rift-080/lang/zh_CN.ts deleted file mode 100644 index e0f8db04..00000000 --- a/tracker-rift-080/lang/zh_CN.ts +++ /dev/null @@ -1,38 +0,0 @@ - - - - - dialog_rift_080 - - Oculus Rift tracker settings FaceTrackNoIR - - - - Yaw spring - - - - Enable - - - - Persistence - - - - Constant drift - - - - Deadzone - - - - - rift_080Dll - - Oculus Rift runtime 0.8.0 -- HMD - - - - -- cgit v1.2.3