]> git.localhorst.tv Git - blobs.git/blobdiff - src/app/MasterState.hpp
better camera behaviour
[blobs.git] / src / app / MasterState.hpp
index 24a29e696463e960918708f1be4151e4429b2de7..cb952157fb23c31dcb719d6a12482481036e291a 100644 (file)
@@ -5,10 +5,16 @@
 
 #include "Assets.hpp"
 #include "../graphics/Camera.hpp"
+#include "../ui/BodyPanel.hpp"
 #include "../ui/CreaturePanel.hpp"
+#include "../ui/RecordsPanel.hpp"
+#include "../ui/TimePanel.hpp"
 
 
 namespace blobs {
+namespace creature {
+       class Creature;
+}
 namespace world {
        class Body;
        class Simulation;
@@ -29,12 +35,21 @@ public:
        MasterState &operator =(MasterState &&) = delete;
 
 public:
+       void Show(creature::Creature &) noexcept;
+       void Show(world::Body &) noexcept;
+
        graphics::Camera &GetCamera() noexcept { return cam; }
        const graphics::Camera &GetCamera() const noexcept { return cam; }
 
        ui::CreaturePanel &GetCreaturePanel() noexcept { return cp; }
        const ui::CreaturePanel &GetCreaturePanel() const noexcept { return cp; }
 
+       ui::RecordsPanel &GetRecordsPanel() noexcept { return rp; }
+       const ui::RecordsPanel &GetRecordsPanel() const noexcept { return rp; }
+
+       ui::TimePanel &GetTimePanel() noexcept { return tp; }
+       const ui::TimePanel &GetTimePanel() const noexcept { return tp; }
+
 private:
        void OnResize(int w, int h) override;
 
@@ -55,12 +70,23 @@ private:
        world::Simulation ∼
 
        graphics::Camera cam;
+       glm::dvec3 cam_pos;
+       glm::dvec3 cam_tgt_pos;
+       glm::dvec3 cam_focus;
+       glm::dvec3 cam_tgt_focus;
+       glm::dvec3 cam_up;
+       glm::dvec3 cam_tgt_up;
        double cam_dist;
-       double cam_tgt_dist;
        glm::dvec3 cam_orient;
        bool cam_dragging;
 
+       creature::Creature *shown_creature;
+       world::Body *shown_body;
+
+       ui::BodyPanel bp;
        ui::CreaturePanel cp;
+       ui::RecordsPanel rp;
+       ui::TimePanel tp;
 
        int remain;
        int thirds;