summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-06-16 08:50:03 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-06-16 09:19:38 +0200
commit4c5c3904a55a748f3453f5b067e2d6d0f0a11848 (patch)
tree523bf9f2129d523366555437c220b5878082b28a
parent7e3f2ec7b38d547e39d667b9ab188f90775dd3bf (diff)
pt: rename for consistency with trackhat
We're going to merge to trackhat often so let's not introduce needless conflicts. PT headers need to be include-able.
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.cpp20
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt.h8
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp22
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h8
-rw-r--r--ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h4
-rw-r--r--ftnoir_tracker_pt/point_extractor.h2
-rw-r--r--ftnoir_tracker_pt/point_tracker.h4
7 files changed, 34 insertions, 34 deletions
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
index b7138f25..4c0913e7 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.cpp
@@ -19,7 +19,7 @@ using namespace cv;
//#define PT_PERF_LOG //log performance
//-----------------------------------------------------------------------------
-Tracker::Tracker()
+Tracker_PT::Tracker_PT()
: mutex(QMutex::Recursive),
commands(0),
video_widget(NULL),
@@ -29,7 +29,7 @@ Tracker::Tracker()
connect(s.b.get(), SIGNAL(saving()), this, SLOT(apply_settings()));
}
-Tracker::~Tracker()
+Tracker_PT::~Tracker_PT()
{
set_command(ABORT);
wait();
@@ -38,26 +38,26 @@ Tracker::~Tracker()
if (video_frame->layout()) delete video_frame->layout();
}
-void Tracker::set_command(Command command)
+void Tracker_PT::set_command(Command command)
{
//QMutexLocker lock(&mutex);
commands |= command;
}
-void Tracker::reset_command(Command command)
+void Tracker_PT::reset_command(Command command)
{
//QMutexLocker lock(&mutex);
commands &= ~command;
}
-float Tracker::get_focal_length()
+float Tracker_PT::get_focal_length()
{
static constexpr float pi = 3.1415926f;
const float fov = static_cast<int>(s.fov) * pi / 180.f;
return 0.5f / tan(0.5f * fov);
}
-void Tracker::run()
+void Tracker_PT::run()
{
#ifdef PT_PERF_LOG
QFile log_file(QCoreApplication::applicationDirPath() + "/PointTrackerPerformance.txt");
@@ -130,7 +130,7 @@ void Tracker::run()
int camera_name_to_index(const QString &name);
-void Tracker::apply_settings()
+void Tracker_PT::apply_settings()
{
qDebug()<<"Tracker:: Applying settings";
QMutexLocker lock(&mutex);
@@ -140,7 +140,7 @@ void Tracker::apply_settings()
qDebug()<<"Tracker::apply ends";
}
-void Tracker::start_tracker(QFrame *parent_window)
+void Tracker_PT::start_tracker(QFrame *parent_window)
{
this->video_frame = parent_window;
video_frame->setAttribute(Qt::WA_NativeWindow);
@@ -167,7 +167,7 @@ void Tracker::StopTracker(bool exit)
#define THeadPoseData double
#endif
-void Tracker::data(THeadPoseData *data)
+void Tracker_PT::data(THeadPoseData *data)
{
if (ever_success)
{
@@ -211,5 +211,5 @@ extern "C" OPENTRACK_EXPORT ITracker* GetConstructor()
OPENTRACK_EXPORT ITrackerPtr __stdcall GetTracker()
#endif
{
- return new Tracker;
+ return new Tracker_PT;
}
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt.h b/ftnoir_tracker_pt/ftnoir_tracker_pt.h
index 349cf2c8..771631cd 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt.h
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt.h
@@ -33,12 +33,12 @@
//-----------------------------------------------------------------------------
// Constantly processes the tracking chain in a separate thread
-class Tracker : public QThread, public ITracker
+class Tracker_PT : public QThread, public ITracker
{
Q_OBJECT
public:
- Tracker();
- ~Tracker() override;
+ Tracker_PT();
+ ~Tracker_PT() override;
void start_tracker(QFrame* parent_window) override;
void data(double* data) override;
@@ -69,7 +69,7 @@ private:
PTVideoWidget* video_widget;
QFrame* video_frame;
- settings s;
+ settings_pt s;
Timer time;
volatile bool ever_success;
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
index 6fa149ed..86178cb3 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.cpp
@@ -21,7 +21,7 @@
using namespace std;
//-----------------------------------------------------------------------------
-TrackerDialog::TrackerDialog()
+TrackerDialog_PT::TrackerDialog_PT()
: tracker(NULL),
timer(this),
trans_calib_running(false)
@@ -86,7 +86,7 @@ TrackerDialog::TrackerDialog()
timer.start(100);
}
-void TrackerDialog::startstop_trans_calib(bool start)
+void TrackerDialog_PT::startstop_trans_calib(bool start)
{
if (start)
{
@@ -110,7 +110,7 @@ void TrackerDialog::startstop_trans_calib(bool start)
}
}
-void TrackerDialog::poll_tracker_info()
+void TrackerDialog_PT::poll_tracker_info()
{
if (tracker)
{
@@ -142,7 +142,7 @@ void TrackerDialog::poll_tracker_info()
}
}
-void TrackerDialog::trans_calib_step()
+void TrackerDialog_PT::trans_calib_step()
{
if (tracker)
{
@@ -151,32 +151,32 @@ void TrackerDialog::trans_calib_step()
}
}
-void TrackerDialog::save()
+void TrackerDialog_PT::save()
{
s.b->save();
}
-void TrackerDialog::doOK()
+void TrackerDialog_PT::doOK()
{
save();
close();
}
-void TrackerDialog::doCancel()
+void TrackerDialog_PT::doCancel()
{
s.b->reload();
close();
}
-void TrackerDialog::register_tracker(ITracker *t)
+void TrackerDialog_PT::register_tracker(ITracker *t)
{
qDebug()<<"TrackerDialog:: Tracker registered";
- tracker = static_cast<Tracker*>(t);
+ tracker = static_cast<Tracker_PT*>(t);
ui.tcalib_button->setEnabled(true);
//ui.center_button->setEnabled(true);
}
-void TrackerDialog::unregister_tracker()
+void TrackerDialog_PT::unregister_tracker()
{
qDebug()<<"TrackerDialog:: Tracker un-registered";
tracker = NULL;
@@ -186,5 +186,5 @@ void TrackerDialog::unregister_tracker()
extern "C" OPENTRACK_EXPORT ITrackerDialog* GetDialog( )
{
- return new TrackerDialog;
+ return new TrackerDialog_PT;
}
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h
index c6f7f8e1..c1cd2e3b 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_dialog.h
@@ -23,11 +23,11 @@
//-----------------------------------------------------------------------------
// The dialog that shows up when the user presses "Settings"
-class TrackerDialog : public ITrackerDialog
+class TrackerDialog_PT : public ITrackerDialog
{
Q_OBJECT
public:
- TrackerDialog();
+ TrackerDialog_PT();
void register_tracker(ITracker *tracker) override;
void unregister_tracker() override;
void save();
@@ -40,8 +40,8 @@ public slots:
void startstop_trans_calib(bool start);
void poll_tracker_info();
private:
- settings s;
- Tracker* tracker;
+ settings_pt s;
+ Tracker_PT* tracker;
QTimer timer;
TranslationCalibrator trans_calib;
diff --git a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h
index fba755bd..30647412 100644
--- a/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h
+++ b/ftnoir_tracker_pt/ftnoir_tracker_pt_settings.h
@@ -13,7 +13,7 @@
#include "opentrack/options.hpp"
using namespace options;
-struct settings : opts
+struct settings_pt : opts
{
value<QString> camera_name;
value<int> cam_res_x,
@@ -36,7 +36,7 @@ struct settings : opts
value<bool> dynamic_pose;
- settings() :
+ settings_pt() :
opts("tracker-pt"),
camera_name(b, "camera-name", ""),
cam_res_x(b, "camera-res-width", 640),
diff --git a/ftnoir_tracker_pt/point_extractor.h b/ftnoir_tracker_pt/point_extractor.h
index 06d148d6..3f6cfb72 100644
--- a/ftnoir_tracker_pt/point_extractor.h
+++ b/ftnoir_tracker_pt/point_extractor.h
@@ -25,7 +25,7 @@ public:
const std::vector<cv::Vec2f>& get_points() { return points; }
PointExtractor();
- settings s;
+ settings_pt s;
private:
std::vector<cv::Vec2f> points;
cv::Mat frame_last;
diff --git a/ftnoir_tracker_pt/point_tracker.h b/ftnoir_tracker_pt/point_tracker.h
index 10bd2cef..3b9573ff 100644
--- a/ftnoir_tracker_pt/point_tracker.h
+++ b/ftnoir_tracker_pt/point_tracker.h
@@ -72,7 +72,7 @@ public:
enum Model { Clip = 0, Cap = 1, Custom = 2 };
- PointModel(settings& s)
+ PointModel(settings_pt& s)
{
set_model(s);
// calculate u
@@ -86,7 +86,7 @@ public:
P = 1.0/(s11*s22-s12*s12) * cv::Matx22f(s22, -s12, -s12, s11);
}
- void set_model(settings& s)
+ void set_model(settings_pt& s)
{
switch (s.active_model_panel)
{