summaryrefslogtreecommitdiff
path: root/camera.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'camera.hpp')
-rw-r--r--camera.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/camera.hpp b/camera.hpp
index f88b4fe..15537f0 100644
--- a/camera.hpp
+++ b/camera.hpp
@@ -1,16 +1,36 @@
#ifndef camera_hpp
#define camera_hpp
+#include "hashmap.hpp"
#include "maths.hpp"
+#include "video.hpp"
struct Camera {
float fov, near, far, asp;
v3f forward, position;
m4f view, proj;
+ int type;
void init(float vfov, const v3f& f, const v3f& p);
+ void init_shadow(
+ const v3f& dir,
+ const v3f& mic,
+ const v3f& mac
+ );
void update();
const m4f& get_view() const;
const m4f& get_proj() const;
};
+struct Camera_Id : public Primitive_Id<uint32_t> {
+ using Primitive_Id<uint32_t>::Primitive_Id;
+};
+
+template<>
+struct Hash_Function<Camera_Id> {
+ size_t operator()(Camera_Id id) const {
+ return id.index;
+ }
+};
+
+
#endif