#pragma once #include #include #include #include "input.hpp" class Camera : private MouseListener { private: glm::vec3 position {0, 0, 5}; float phi = 0; float theta = 0; float fov = 45; float near = 0.1; float far = 100; VkExtent2D& extent; public: explicit Camera(VkExtent2D& extent); void update(float dt); glm::mat4 view() const; glm::mat4 projection() const; glm::vec3 localToWorld(const glm::vec3& direction) const; protected: void mouseMoved(const glm::vec2 &delta) override; };