summaryrefslogtreecommitdiffhomepage
path: root/tracker-rift-080
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-rift-080')
-rw-r--r--tracker-rift-080/CMakeLists.txt3
-rw-r--r--tracker-rift-080/ftnoir_rift_080.qrc7
-rw-r--r--tracker-rift-080/ftnoir_rift_clientcontrols_080.ui176
-rw-r--r--tracker-rift-080/ftnoir_tracker_rift_080.cpp113
-rw-r--r--tracker-rift-080/ftnoir_tracker_rift_080.h60
-rw-r--r--tracker-rift-080/ftnoir_tracker_rift_dialog_080.cpp25
-rw-r--r--tracker-rift-080/images/medium.pngbin5764 -> 0 bytes
-rw-r--r--tracker-rift-080/images/rift_medium.pngbin5764 -> 0 bytes
-rw-r--r--tracker-rift-080/images/rift_small.pngbin1212 -> 0 bytes
-rw-r--r--tracker-rift-080/images/rift_tiny.pngbin624 -> 0 bytes
-rw-r--r--tracker-rift-080/images/small.pngbin1212 -> 0 bytes
-rw-r--r--tracker-rift-080/images/tiny.pngbin624 -> 0 bytes
-rw-r--r--tracker-rift-080/lang/nl_NL.ts38
-rw-r--r--tracker-rift-080/lang/ru_RU.ts38
-rw-r--r--tracker-rift-080/lang/stub.ts38
-rw-r--r--tracker-rift-080/lang/zh_CN.ts38
16 files changed, 0 insertions, 536 deletions
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 @@
-<RCC>
- <qresource prefix="/">
- <file>images/rift_medium.png</file>
- <file>images/rift_small.png</file>
- <file>images/rift_tiny.png</file>
- </qresource>
-</RCC>
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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>dialog_rift_080</class>
- <widget class="QWidget" name="dialog_rift_080">
- <property name="windowModality">
- <enum>Qt::NonModal</enum>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>218</width>
- <height>200</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle">
- <string>Oculus Rift tracker settings FaceTrackNoIR</string>
- </property>
- <property name="windowIcon">
- <iconset>
- <normaloff>images/opentrack.png</normaloff>images/opentrack.png</iconset>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0">
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Yaw spring</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QCheckBox" name="yawSpring">
- <property name="text">
- <string>Enable</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Persistence</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QDoubleSpinBox" name="persistence">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>23</height>
- </size>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>0.900000000000000</double>
- </property>
- <property name="maximum">
- <double>1.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>0.001000000000000</double>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Constant drift</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QDoubleSpinBox" name="constantDrift">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>23</height>
- </size>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="minimum">
- <double>0.000100000000000</double>
- </property>
- <property name="maximum">
- <double>0.100000000000000</double>
- </property>
- <property name="singleStep">
- <double>0.001000000000000</double>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Deadzone</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QDoubleSpinBox" name="deadzone">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>23</height>
- </size>
- </property>
- <property name="decimals">
- <number>5</number>
- </property>
- <property name="maximum">
- <double>0.100000000000000</double>
- </property>
- <property name="singleStep">
- <double>0.010000000000000</double>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
- <slots>
- <slot>startEngineClicked()</slot>
- <slot>stopEngineClicked()</slot>
- <slot>cameraSettingsClicked()</slot>
- </slots>
-</ui>
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 <QString>
-
-#include <Extras/OVR_Math.h>
-#include <OVR_CAPI_0_8_0.h>
-
-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 <OVR.h>
-#include <cmath>
-#include <QMessageBox>
-#include <QWaitCondition>
-using namespace options;
-
-struct settings : opts {
- value<bool> useYawSpring;
- value<double> 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
--- a/tracker-rift-080/images/medium.png
+++ /dev/null
Binary files 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
--- a/tracker-rift-080/images/rift_medium.png
+++ /dev/null
Binary files 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
--- a/tracker-rift-080/images/rift_small.png
+++ /dev/null
Binary files 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
--- a/tracker-rift-080/images/rift_tiny.png
+++ /dev/null
Binary files differ
diff --git a/tracker-rift-080/images/small.png b/tracker-rift-080/images/small.png
deleted file mode 100644
index 3f18080c..00000000
--- a/tracker-rift-080/images/small.png
+++ /dev/null
Binary files differ
diff --git a/tracker-rift-080/images/tiny.png b/tracker-rift-080/images/tiny.png
deleted file mode 100644
index 76fe0f58..00000000
--- a/tracker-rift-080/images/tiny.png
+++ /dev/null
Binary files 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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="nl_NL">
-<context>
- <name>dialog_rift_080</name>
- <message>
- <source>Oculus Rift tracker settings FaceTrackNoIR</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Yaw spring</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Enable</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Persistence</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Constant drift</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Deadzone</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>rift_080Dll</name>
- <message>
- <source>Oculus Rift runtime 0.8.0 -- HMD</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="ru_RU">
-<context>
- <name>dialog_rift_080</name>
- <message>
- <source>Oculus Rift tracker settings FaceTrackNoIR</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Yaw spring</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Enable</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Persistence</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Constant drift</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Deadzone</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>rift_080Dll</name>
- <message>
- <source>Oculus Rift runtime 0.8.0 -- HMD</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1">
-<context>
- <name>dialog_rift_080</name>
- <message>
- <source>Oculus Rift tracker settings FaceTrackNoIR</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Yaw spring</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Enable</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Persistence</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Constant drift</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Deadzone</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>rift_080Dll</name>
- <message>
- <source>Oculus Rift runtime 0.8.0 -- HMD</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1">
-<context>
- <name>dialog_rift_080</name>
- <message>
- <source>Oculus Rift tracker settings FaceTrackNoIR</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Yaw spring</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Enable</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Persistence</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Constant drift</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <source>Deadzone</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>rift_080Dll</name>
- <message>
- <source>Oculus Rift runtime 0.8.0 -- HMD</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>