diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-19 13:39:50 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-19 13:39:50 +0200 |
commit | a8ffbb76f3e3bbca547fccf5135323e06cae9d2a (patch) | |
tree | cd77a5302cb4ead5995a2a86d5b5b6324ebf43ff /ftnoir_tracker_rift | |
parent | 0f0d663c6263a59e2cb14f555a00b39b19c134e7 (diff) |
update modules to refactored API
Diffstat (limited to 'ftnoir_tracker_rift')
-rw-r--r-- | ftnoir_tracker_rift/ftnoir_tracker_rift.cpp | 4 | ||||
-rw-r--r-- | ftnoir_tracker_rift/ftnoir_tracker_rift.h | 25 | ||||
-rw-r--r-- | ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp | 32 |
3 files changed, 10 insertions, 51 deletions
diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp index 68a520ad..9f44c78e 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.cpp @@ -17,7 +17,7 @@ Rift_Tracker::~Rift_Tracker() ovr_Shutdown(); } -void Rift_Tracker::StartTracker(QFrame*) +void Rift_Tracker::start_tracker(QFrame*) { ovr_Initialize(); hmd = ovrHmd_Create(0); @@ -34,7 +34,7 @@ void Rift_Tracker::StartTracker(QFrame*) } -void Rift_Tracker::GetHeadPoseData(double *data) +void Rift_Tracker::data(double *data) { if (hmd) { diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.h b/ftnoir_tracker_rift/ftnoir_tracker_rift.h index b862555c..db14a536 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.h +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.h @@ -27,22 +27,22 @@ class Rift_Tracker : public ITracker public: Rift_Tracker(); ~Rift_Tracker() override; - void StartTracker(QFrame *) override; - void GetHeadPoseData(double *data) override; + void start_tracker(QFrame *) override; + void data(double *data) override; private: double old_yaw; ovrHmd hmd; settings s; }; -class TrackerControls: public QWidget, public ITrackerDialog +class TrackerControls: public ITrackerDialog { Q_OBJECT public: - explicit TrackerControls(); + TrackerControls(); - void registerTracker(ITracker *) {} - void unRegisterTracker() {} + void register_tracker(ITracker *) {} + void unregister_tracker() {} private: Ui::UIRiftControls ui; @@ -55,16 +55,7 @@ private slots: class FTNoIR_TrackerDll : public Metadata { public: - FTNoIR_TrackerDll(); - ~FTNoIR_TrackerDll(); - void getFullName(QString *strToBeFilled); - void getShortName(QString *strToBeFilled); - void getDescription(QString *strToBeFilled); - void getIcon(QIcon *icon); - -private: - QString trackerFullName; // Trackers' name and description - QString trackerShortName; - QString trackerDescription; + QString name() { return QString("Oculus Rift -- HMD"); } + QIcon icon() { return QIcon(":/images/rift_tiny.png"); } }; diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp b/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp index 902c8051..fd50f75f 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift_dll.cpp @@ -3,38 +3,6 @@ #include <QDebug> #include "facetracknoir/plugin-support.h" -FTNoIR_TrackerDll::FTNoIR_TrackerDll() { - //populate the description strings - trackerFullName = "Rift"; - trackerShortName = "Rift"; - trackerDescription = "Rift"; -} - -FTNoIR_TrackerDll::~FTNoIR_TrackerDll() -{ - -} - -void FTNoIR_TrackerDll::getFullName(QString *strToBeFilled) -{ - *strToBeFilled = trackerFullName; -} - -void FTNoIR_TrackerDll::getShortName(QString *strToBeFilled) -{ - *strToBeFilled = trackerShortName; -} - -void FTNoIR_TrackerDll::getDescription(QString *strToBeFilled) -{ - *strToBeFilled = trackerDescription; -} - -void FTNoIR_TrackerDll::getIcon(QIcon *icon) -{ - *icon = QIcon(":/images/rift_tiny.png"); -} - extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_TrackerDll; |