]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/cameracontroller.h
Use a GL::Camera
[r2c2.git] / source / designer / cameracontroller.h
diff --git a/source/designer/cameracontroller.h b/source/designer/cameracontroller.h
new file mode 100644 (file)
index 0000000..63ba2c1
--- /dev/null
@@ -0,0 +1,34 @@
+/* $Id$
+
+This file is part of the MSP Märklin suite
+Copyright © 2010 Mikkosoft Productions, Mikko Rasa
+Distributed under the GPL
+*/
+
+#ifndef CAMERACONTROLLER_H_
+#define CAMERACONTROLLER_H_
+
+#include <msp/gbase/window.h>
+#include <msp/gl/camera.h>
+
+class CameraController
+{
+private:
+       Msp::Graphics::Window &window;
+       Msp::GL::Camera &camera;
+       int move_x;
+       int move_y;
+       int zoom;
+       int rotate;
+       int pitch;
+
+public:
+       CameraController(Msp::Graphics::Window &, Msp::GL::Camera &);
+
+       void tick(float);
+private:
+       void key_press(unsigned, unsigned, wchar_t);
+       void key_release(unsigned, unsigned);
+};
+
+#endif