From 04db6b0ccd81d988cfe3a1d09e4eb00eeea77273 Mon Sep 17 00:00:00 2001 From: quou Date: Sat, 22 Feb 2025 17:01:35 +1100 Subject: basic shadows --- camera.hpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'camera.hpp') 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 { + using Primitive_Id::Primitive_Id; +}; + +template<> +struct Hash_Function { + size_t operator()(Camera_Id id) const { + return id.index; + } +}; + + #endif -- cgit v1.2.3-54-g00ecf