#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