]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/cameracontroller.h
Convert Measure to a Renderable
[r2c2.git] / source / designer / cameracontroller.h
index 6d5270c1056039271c5f63d5fa9a3577b1ebd505..4ed45b0e7d0c89ad4d31bf1fa6631119d7056523 100644 (file)
@@ -3,6 +3,8 @@
 
 #include <msp/graphics/window.h>
 #include <msp/gl/camera.h>
+#include <msp/input/keyboard.h>
+#include <msp/input/mouse.h>
 #include "3d/view.h"
 
 /**
@@ -31,16 +33,19 @@ private:
        };
 
        R2C2::View3D &view;
-       Msp::Graphics::EventSource &event_source;
+       Msp::Input::Keyboard &keyboard;
+       Msp::Input::Mouse &mouse;
        Msp::GL::Camera &camera;
        int move_x;
        int move_y;
        int pointer_x;
        int pointer_y;
+       bool shift_pressed;
+       bool ctrl_pressed;
        DragMode drag_mode;
 
 public:
-       CameraController(R2C2::View3D &, Msp::Graphics::EventSource &);
+       CameraController(R2C2::View3D &, Msp::Input::Keyboard &, Msp::Input::Mouse &);
 
        void top_down();
        void set_look_direction(const Msp::GL::Vector3 &);
@@ -53,11 +58,11 @@ public:
 
        void tick(float);
 private:
-       void button_press(int, int, unsigned, unsigned);
-       void button_release(int, int, unsigned, unsigned);
-       void pointer_motion(int, int);
-       void key_press(unsigned, unsigned, wchar_t);
-       void key_release(unsigned, unsigned);
+       void button_press(unsigned);
+       void button_release(unsigned);
+       void axis_motion(unsigned, float, float);
+       void key_press(unsigned);
+       void key_release(unsigned);
 
 public:
        /** Return the focus point, i.e. where the look ray intersects with ground. */