diff options
author | quou <quou@disroot.org> | 2025-02-22 17:01:35 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2025-02-22 17:01:53 +1100 |
commit | 04db6b0ccd81d988cfe3a1d09e4eb00eeea77273 (patch) | |
tree | 5163857dca5070ecea802452c1e4e22806e4fbab /camera.hpp | |
parent | 944ca7aede48f358329cc9e6cdac479648f30c17 (diff) |
basic shadows
Diffstat (limited to 'camera.hpp')
-rw-r--r-- | camera.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 |