summaryrefslogtreecommitdiffhomepage
path: root/View.h
diff options
context:
space:
mode:
Diffstat (limited to 'View.h')
-rw-r--r--View.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/View.h b/View.h
new file mode 100644
index 0000000..13eb881
--- /dev/null
+++ b/View.h
@@ -0,0 +1,27 @@
+#pragma once
+
+#include <memory>
+#include <vector>
+
+#include <raylib.h>
+
+#include "Source.h"
+
+
+class View
+{
+public:
+ explicit View(std::unique_ptr<Source> source);
+ void update(float dt);
+ void draw() const;
+private:
+ struct Projected
+ {
+ Vector2 pos;
+ Vector2 base;
+ float depth;
+ };
+ Camera m_camera;
+ std::unique_ptr<Source> m_source;
+ std::vector<Projected> m_projected;
+};