summaryrefslogtreecommitdiffhomepage
path: root/logic
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-10-21 13:26:38 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-10-21 13:26:38 +0200
commit207a70f1cd99e9719a878b9c6b3909302a020e93 (patch)
tree57292ec9f356ce4bbafd5e45e3305cff0a529a82 /logic
parent3b5a3500766abd38907824a8b02991708309488e (diff)
logic/tracker: rename to pipeline
Could use a better name.
Diffstat (limited to 'logic')
-rw-r--r--logic/pipeline.cpp (renamed from logic/tracker.cpp)36
-rw-r--r--logic/pipeline.hpp (renamed from logic/tracker.h)8
-rw-r--r--logic/tracklogger.cpp2
-rw-r--r--logic/work.cpp2
-rw-r--r--logic/work.hpp4
5 files changed, 26 insertions, 26 deletions
diff --git a/logic/tracker.cpp b/logic/pipeline.cpp
index b834715a..a77aa54a 100644
--- a/logic/tracker.cpp
+++ b/logic/pipeline.cpp
@@ -16,7 +16,7 @@
#include "compat/sleep.hpp"
#include "compat/util.hpp"
-#include "tracker.h"
+#include "pipeline.hpp"
#include <cmath>
#include <algorithm>
@@ -30,10 +30,10 @@ using namespace euler;
using namespace gui_tracker_impl;
using namespace time_units;
-constexpr double Tracker::r2d;
-constexpr double Tracker::d2r;
+constexpr double pipeline::r2d;
+constexpr double pipeline::d2r;
-Tracker::Tracker(Mappings& m, runtime_libraries& libs, event_handler& ev, TrackLogger& logger) :
+pipeline::pipeline(Mappings& m, runtime_libraries& libs, event_handler& ev, TrackLogger& logger) :
m(m),
ev(ev),
libs(libs),
@@ -43,13 +43,13 @@ Tracker::Tracker(Mappings& m, runtime_libraries& libs, event_handler& ev, TrackL
{
}
-Tracker::~Tracker()
+pipeline::~pipeline()
{
requestInterruption();
wait();
}
-double Tracker::map(double pos, Map& axis)
+double pipeline::map(double pos, Map& axis)
{
bool altp = (pos < 0) && axis.opts.altp;
axis.spline_main.set_tracking_active( !altp );
@@ -58,7 +58,7 @@ double Tracker::map(double pos, Map& axis)
return double(fc.get_value(pos));
}
-void Tracker::t_compensate(const rmat& rmat, const euler_t& xyz, euler_t& output,
+void pipeline::t_compensate(const rmat& rmat, const euler_t& xyz, euler_t& output,
bool disable_tx, bool disable_ty, bool disable_tz)
{
enum { tb_Z, tb_X, tb_Y };
@@ -105,10 +105,10 @@ static bool is_nan(const dmat<u,w>& r)
return false;
}
-constexpr double Tracker::c_mult;
-constexpr double Tracker::c_div;
+constexpr double pipeline::c_mult;
+constexpr double pipeline::c_div;
-void Tracker::logic()
+void pipeline::logic()
{
using namespace euler;
using EV = event_handler::event_ordinal;
@@ -369,7 +369,7 @@ void Tracker::logic()
logger.next_line();
}
-void Tracker::run()
+void pipeline::run()
{
#if defined _WIN32
const MMRESULT mmres = timeBeginPeriod(1);
@@ -439,9 +439,9 @@ void Tracker::run()
#endif
}
-void Tracker::raw_and_mapped_pose(double* mapped, double* raw) const
+void pipeline::raw_and_mapped_pose(double* mapped, double* raw) const
{
- QMutexLocker foo(&const_cast<Tracker&>(*this).mtx);
+ QMutexLocker foo(&const_cast<pipeline&>(*this).mtx);
for (int i = 0; i < 6; i++)
{
@@ -450,13 +450,13 @@ void Tracker::raw_and_mapped_pose(double* mapped, double* raw) const
}
}
-void Tracker::center() { set(f_center, true); }
+void pipeline::center() { set(f_center, true); }
-void Tracker::set_toggle(bool value) { set(f_enabled_h, value); }
-void Tracker::set_zero(bool value) { set(f_zero, value); }
+void pipeline::set_toggle(bool value) { set(f_enabled_h, value); }
+void pipeline::set_zero(bool value) { set(f_zero, value); }
-void Tracker::zero() { negate(f_zero); }
-void Tracker::toggle_enabled() { negate(f_enabled_p); }
+void pipeline::zero() { negate(f_zero); }
+void pipeline::toggle_enabled() { negate(f_enabled_p); }
void bits::set(bits::flags flag_, bool val_)
diff --git a/logic/tracker.h b/logic/pipeline.hpp
index e7b4a76d..58900d34 100644
--- a/logic/tracker.h
+++ b/logic/pipeline.hpp
@@ -49,7 +49,7 @@ struct OTR_LOGIC_EXPORT bits
bits();
};
-class OTR_LOGIC_EXPORT Tracker : private QThread, private bits
+class OTR_LOGIC_EXPORT pipeline : private QThread, private bits
{
Q_OBJECT
private:
@@ -100,8 +100,8 @@ private:
static constexpr double c_mult = 16;
static constexpr double c_div = 1./c_mult;
public:
- Tracker(Mappings& m, runtime_libraries& libs, event_handler& ev, TrackLogger& logger);
- ~Tracker();
+ pipeline(Mappings& m, runtime_libraries& libs, event_handler& ev, TrackLogger& logger);
+ ~pipeline();
void raw_and_mapped_pose(double* mapped, double* raw) const;
void start() { QThread::start(QThread::HighPriority); }
@@ -115,4 +115,4 @@ public:
} // ns impl
-using gui_tracker_impl::Tracker;
+using gui_tracker_impl::pipeline;
diff --git a/logic/tracklogger.cpp b/logic/tracklogger.cpp
index 64dda579..35510cb3 100644
--- a/logic/tracklogger.cpp
+++ b/logic/tracklogger.cpp
@@ -1,5 +1,5 @@
#include "tracklogger.hpp"
-#include "tracker.h"
+#include "pipeline.hpp"
TrackLogger::~TrackLogger() {}
diff --git a/logic/work.cpp b/logic/work.cpp
index 1b1b87fa..53407f7c 100644
--- a/logic/work.cpp
+++ b/logic/work.cpp
@@ -62,7 +62,7 @@ std::shared_ptr<TrackLogger> Work::make_logger(main_settings &s)
Work::Work(Mappings& m, event_handler& ev, QFrame* frame, std::shared_ptr<dylib> tracker_, std::shared_ptr<dylib> filter_, std::shared_ptr<dylib> proto_) :
libs(frame, tracker_, filter_, proto_),
logger(make_logger(s)),
- tracker(std::make_shared<Tracker>(m, libs, ev, *logger)),
+ tracker(std::make_shared<pipeline>(m, libs, ev, *logger)),
sc(std::make_shared<Shortcuts>()),
keys {
key_tuple(s.key_center1, [&](bool) -> void { tracker->center(); }, true),
diff --git a/logic/work.hpp b/logic/work.hpp
index 1f7551a0..7f6cb450 100644
--- a/logic/work.hpp
+++ b/logic/work.hpp
@@ -10,7 +10,7 @@
#include "main-settings.hpp"
#include "api/plugin-support.hpp"
-#include "tracker.h"
+#include "pipeline.hpp"
#include "shortcuts.h"
#include "export.hpp"
#include "tracklogger.hpp"
@@ -31,7 +31,7 @@ struct OTR_LOGIC_EXPORT Work
main_settings s; // tracker needs settings, so settings must come before it
runtime_libraries libs; // idem
std::shared_ptr<TrackLogger> logger; // must come before tracker, since tracker depends on it
- std::shared_ptr<Tracker> tracker;
+ std::shared_ptr<pipeline> tracker;
std::shared_ptr<Shortcuts> sc;
std::vector<key_tuple> keys;