diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-11-26 19:42:54 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-11-26 19:45:02 +0100 |
commit | 56c199090d3b84a187a788e0ce47ac5965e06484 (patch) | |
tree | b9ac8fdf4cc125031a67bc497913ebc11f6a25f8 | |
parent | c972f37886e3db405f30b713b96a3dedf72675b6 (diff) |
declare tracker hz to prevent deconvergence of IHT
-rw-r--r-- | ftnoir_tracker_base/ftnoir_tracker_base.h | 1 | ||||
-rw-r--r-- | ftnoir_tracker_hydra/ftnoir_tracker_hydra.h | 14 | ||||
-rw-r--r-- | ftnoir_tracker_rift/ftnoir_tracker_rift.h | 9 |
3 files changed, 14 insertions, 10 deletions
diff --git a/ftnoir_tracker_base/ftnoir_tracker_base.h b/ftnoir_tracker_base/ftnoir_tracker_base.h index 070c8c33..38c24afe 100644 --- a/ftnoir_tracker_base/ftnoir_tracker_base.h +++ b/ftnoir_tracker_base/ftnoir_tracker_base.h @@ -44,6 +44,7 @@ struct ITracker virtual ~ITracker() = 0; virtual void StartTracker( QFrame* frame ) = 0; virtual bool GiveHeadPoseData(double *data) = 0; + virtual int preferredHz() { return 66; } }; inline ITracker::~ITracker() { } diff --git a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h index 2601ac55..3daaf239 100644 --- a/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h +++ b/ftnoir_tracker_hydra/ftnoir_tracker_hydra.h @@ -9,11 +9,11 @@ class Hydra_Tracker : public ITracker { public: Hydra_Tracker(); - ~Hydra_Tracker(); + ~Hydra_Tracker(); - void StartTracker(QFrame *); - bool GiveHeadPoseData(double *data); - void loadSettings(); + void StartTracker(QFrame *) virt_override; + bool GiveHeadPoseData(double *data) virt_override; + void loadSettings(); volatile bool should_quit; protected: void run(); // qthread override run method @@ -31,6 +31,8 @@ private: bool bEnableZ; QMutex mutex; + + virtual int preferredHz() virt_override { return 250; } }; // Widget that has controls for FTNoIR protocol client-settings. @@ -58,8 +60,8 @@ private: private slots: void doOK(); void doCancel(); - void settingChanged() { settingsDirty = true; }; - void settingChanged(int) { settingsDirty = true; }; + void settingChanged() { settingsDirty = true; } + void settingChanged(int) { settingsDirty = true; } }; //******************************************************************************************************* diff --git a/ftnoir_tracker_rift/ftnoir_tracker_rift.h b/ftnoir_tracker_rift/ftnoir_tracker_rift.h index 787f16b9..93b03b97 100644 --- a/ftnoir_tracker_rift/ftnoir_tracker_rift.h +++ b/ftnoir_tracker_rift/ftnoir_tracker_rift.h @@ -12,11 +12,12 @@ class Rift_Tracker : public ITracker { public: Rift_Tracker(); - virtual ~Rift_Tracker(); + virtual ~Rift_Tracker() virt_override; - void StartTracker(QFrame *); - bool GiveHeadPoseData(double *data); - void loadSettings(); + void StartTracker(QFrame *) virt_override; + bool GiveHeadPoseData(double *data) virt_override; + void loadSettings(); + virtual int preferredHz() virt_override { return 250; } volatile bool should_quit; protected: void run(); // qthread override run method |