summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_hydra
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-10-30 07:37:41 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-10-30 08:39:32 +0100
commitaa066bdd4622d4f6824fee864f6be6806813f04d (patch)
tree3df328b8b364cba2373a85827191b259bd78d546 /ftnoir_tracker_hydra
parentd6a54431d178632a2bf466c9904f74abd143afe6 (diff)
move to subdirectory-based build system
Closes #224
Diffstat (limited to 'ftnoir_tracker_hydra')
-rw-r--r--ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui53
-rw-r--r--ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp46
-rw-r--r--ftnoir_tracker_hydra/ftnoir_tracker_hydra.h46
-rw-r--r--ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp22
4 files changed, 0 insertions, 167 deletions
diff --git a/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui b/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui
deleted file mode 100644
index 7cfac075..00000000
--- a/ftnoir_tracker_hydra/ftnoir_hydra_clientcontrols.ui
+++ /dev/null
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>UIHydraControls</class>
- <widget class="QWidget" name="UIHydraControls">
- <property name="windowModality">
- <enum>Qt::NonModal</enum>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>190</width>
- <height>62</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Sixense Hydra tracker settings FaceTrackNoIR</string>
- </property>
- <property name="windowIcon">
- <iconset>
- <normaloff>images/FaceTrackNoIR.png</normaloff>images/FaceTrackNoIR.png</iconset>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>None whatsoever</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QDialogButtonBox" name="buttonBox">
- <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/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp
deleted file mode 100644
index 8d0e6832..00000000
--- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright: "i couldn't care less what anyone does with the 5 lines of code i wrote" - mm0zct */
-#include "ftnoir_tracker_hydra.h"
-#include "opentrack/plugin-api.hpp"
-#include <cstdio>
-#ifdef _WIN32
-# define SIXENSE_STATIC_LIB
-# define SIXENSE_UTILS_STATIC_LIB
-#endif
-#include <sixense.h>
-
-Hydra_Tracker::Hydra_Tracker() : should_quit(false) {}
-
-#include <sixense_math.hpp>
-
-Hydra_Tracker::~Hydra_Tracker()
-{
-
- sixenseExit();
-}
-
-void Hydra_Tracker::start_tracker(QFrame*)
-{
- sixenseInit();
-}
-
-void Hydra_Tracker::data(double *data)
-{
-
- sixenseSetActiveBase(0);
- sixenseAllControllerData acd;
- sixenseGetAllNewestData( &acd );
- sixenseMath::Matrix4 mat = sixenseMath::Matrix4(acd.controllers[0].rot_mat);
-
- float ypr[3];
-
- mat.getEulerAngles().fill(ypr);
- data[TX] = acd.controllers[0].pos[0]/50.0;
- data[TY] = acd.controllers[0].pos[1]/50.0;
- data[TZ] = acd.controllers[0].pos[2]/50.0;
- static constexpr double r2d = 57.295781;
- data[Yaw] = ypr[0] * r2d;
- data[Pitch] = ypr[1] * r2d;
- data[Roll] = ypr[2] * r2d;
-}
-
-OPENTRACK_DECLARE_TRACKER(Hydra_Tracker, TrackerControls, FTNoIR_TrackerDll)
diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h
deleted file mode 100644
index 47a1eb9a..00000000
--- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "ui_ftnoir_hydra_clientcontrols.h"
-#include "opentrack/plugin-api.hpp"
-#include "opentrack/options.hpp"
-using namespace options;
-
-struct settings : opts {
- settings() :
- opts("tracker-hydra")
- {}
-};
-
-class Hydra_Tracker : public ITracker
-{
-public:
- Hydra_Tracker();
- ~Hydra_Tracker();
- void start_tracker(QFrame *) override;
- void data(double *data) override;
- volatile bool should_quit;
-private:
- settings s;
- QMutex mutex;
-};
-
-class TrackerControls: public ITrackerDialog
-{
- Q_OBJECT
-public:
- TrackerControls();
- void register_tracker(ITracker *) {}
- void unregister_tracker() {}
-private:
- settings s;
- Ui::UIHydraControls ui;
-private slots:
- void doOK();
- void doCancel();
-};
-
-class FTNoIR_TrackerDll : public Metadata
-{
-public:
- QString name() { return QString("Razer Hydra -- inertial device"); }
- QIcon icon() { return QIcon(":/images/facetracknoir.png"); }
-};
-
diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp b/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp
deleted file mode 100644
index 2c23ee46..00000000
--- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra_dialog.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-#include "ftnoir_tracker_hydra.h"
-#include "opentrack/plugin-api.hpp"
-
-TrackerControls::TrackerControls()
-{
- ui.setupUi( this );
-
- // Connect Qt signals to member-functions
- connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
- connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
-}
-
-void TrackerControls::doOK() {
- s.b->save();
- this->close();
-}
-
-void TrackerControls::doCancel() {
- s.b->reload();
- close();
-}
-