summary refs log tree commit diff
path: root/src/Mouse.hpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-10-06 02:48:43 +0200
committerMel <einebeere@gmail.com>2022-10-06 02:48:43 +0200
commitfdbfa8e36f85eee051fc562f1a8588970257a20f (patch)
treee861a56c50b1e8532bd71a21064d76d0c148ed3a /src/Mouse.hpp
parent731846a0c654b39e23c26f611470e401df404c9d (diff)
downloadmeowcraft-fdbfa8e36f85eee051fc562f1a8588970257a20f.tar.zst
meowcraft-fdbfa8e36f85eee051fc562f1a8588970257a20f.zip
Rotating camera with mouse
Diffstat (limited to 'src/Mouse.hpp')
-rw-r--r--src/Mouse.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Mouse.hpp b/src/Mouse.hpp
new file mode 100644
index 0000000..c546a7e
--- /dev/null
+++ b/src/Mouse.hpp
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <cstdint>
+#include "Math/Vector.hpp"
+#include "Window.hpp"
+
+namespace MC {
+
+class Mouse {
+public:
+    Mouse() = default;
+
+    Vector<2> update(Window &window);
+private:
+    bool m_first_event = true;
+    float m_last_x, m_last_y = 0.0f;
+};
+
+}
\ No newline at end of file