diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2018-02-05 09:33:00 +0100 | 
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-02-16 14:09:56 +0100 | 
| commit | 235e26cc63fe401affafed8a5b4fe52a134fc376 (patch) | |
| tree | 90da7ec40730ec75e1d00d11199cb1c975e38caf /logic/pipeline.hpp | |
| parent | 7a973ae2ad396c8413405e40bcb2eaab67c95d15 (diff) | |
[WIP] logic/pipeline: simplificationpipeline-work-20180216
NEEDS TESTING. DO NOT COMMIT!!!
Diffstat (limited to 'logic/pipeline.hpp')
| -rw-r--r-- | logic/pipeline.hpp | 28 | 
1 files changed, 21 insertions, 7 deletions
| diff --git a/logic/pipeline.hpp b/logic/pipeline.hpp index 1e1919f4..5c3c3a26 100644 --- a/logic/pipeline.hpp +++ b/logic/pipeline.hpp @@ -35,6 +35,9 @@ 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; @@ -46,11 +49,13 @@ public:      reltrans();      warn_result_unused -    euler_t rotate(const rmat& rmat, const euler_t& xyz, -                   bool disable_tx, bool disable_ty, bool disable_tz) const; +    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);      warn_result_unused -    Pose apply_pipeline(reltrans_state cur, const Pose& value, const Mat<bool, 6, 1>& disable); +    euler_t apply_neck(const Pose& value, bool enable, int nz) const;  };  using namespace time_units; @@ -112,6 +117,14 @@ 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; @@ -123,11 +136,12 @@ public:      void raw_and_mapped_pose(double* mapped, double* raw) const;      void start() { QThread::start(QThread::HighPriority); } -    void center(); -    void set_toggle(bool value); -    void set_zero(bool value); -    void zero(); +    void toggle_zero();      void toggle_enabled(); + +    void set_center(); +    void set_enabled(bool value); +    void set_zero(bool value);  };  } // ns impl | 
