3 #include <glm/gtx/rotate_vector.hpp>
8 Camera::Camera(const glm::vec3 &f)
11 , pitch(1.04719755119659774614f) // π/3
16 void Camera::Focus(const glm::vec3 &f) noexcept {
20 glm::mat4 Camera::View() const noexcept {
21 const glm::vec3 position(*focus - distance * rotateY(rotateX(glm::vec3(0.0f, 0.0f, 1.0f), pitch), yaw));
22 return glm::lookAt(position, *focus, glm::vec3(0.0f, 1.0f, 0.0f));