summaryrefslogtreecommitdiffhomepage
path: root/logic/pipeline.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-02-21 10:26:26 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-02-21 11:13:09 +0100
commit26e408eafd9d81b2bc348f4a9357aac717c8ce1f (patch)
treea0e82f94d2b579f9115c2ade8310d8576567c7e4 /logic/pipeline.hpp
parent8354713abd533c3a48282f5cdce8961df5ffa178 (diff)
[STABLE] logic/pipeline: revert refactor
Diffstat (limited to 'logic/pipeline.hpp')
-rw-r--r--logic/pipeline.hpp28
1 files changed, 7 insertions, 21 deletions
diff --git a/logic/pipeline.hpp b/logic/pipeline.hpp
index 5c3c3a26..1e1919f4 100644
--- a/logic/pipeline.hpp
+++ b/logic/pipeline.hpp
@@ -35,9 +35,6 @@ namespace gui_tracker_impl {
using rmat = euler::rmat;
using euler_t = euler::euler_t;
-using vec6_bool = Mat<bool, 6, 1>;
-using vec3_bool = Mat<bool, 6, 1>;
-
class reltrans
{
euler_t interp_pos, last_value;
@@ -49,13 +46,11 @@ public:
reltrans();
warn_result_unused
- euler_t rotate(const rmat& rmat, const euler_t& in, vec3_bool disable) const;
-
- warn_result_unused
- Pose apply_pipeline(reltrans_state cur, const Pose& value, const vec6_bool& disable);
+ euler_t rotate(const rmat& rmat, const euler_t& xyz,
+ bool disable_tx, bool disable_ty, bool disable_tz) const;
warn_result_unused
- euler_t apply_neck(const Pose& value, bool enable, int nz) const;
+ Pose apply_pipeline(reltrans_state cur, const Pose& value, const Mat<bool, 6, 1>& disable);
};
using namespace time_units;
@@ -117,14 +112,6 @@ private:
double map(double pos, Map& axis);
void logic();
void run() override;
- void maybe_enable_center_on_tracking_started();
- void maybe_set_center_pose(const Pose& value, bool own_center_logic);
- Pose clamp_value(Pose value) const;
- Pose apply_center(Pose value) const;
- std::tuple<Pose, Pose, vec6_bool> get_selected_axis_value(const Pose& newpose) const;
- Pose maybe_apply_filter(const Pose& value) const;
- Pose apply_reltrans(Pose value, vec6_bool disabled);
- Pose apply_zero_pos(Pose value) const;
// note: float exponent base is 2
static constexpr inline double c_mult = 16;
@@ -136,12 +123,11 @@ public:
void raw_and_mapped_pose(double* mapped, double* raw) const;
void start() { QThread::start(QThread::HighPriority); }
- void toggle_zero();
- void toggle_enabled();
-
- void set_center();
- void set_enabled(bool value);
+ void center();
+ void set_toggle(bool value);
void set_zero(bool value);
+ void zero();
+ void toggle_enabled();
};
} // ns impl