3 #include "../model/geometry.hpp"
6 #include <glm/gtc/matrix_transform.hpp>
11 Camera::Camera() noexcept
16 , projection(glm::perspective(fov, aspect, near_clip, far_clip)) {
21 void Camera::Viewport(int width, int height) noexcept {
22 Viewport(0, 0, width, height);
25 void Camera::Viewport(int x, int y, int width, int height) noexcept {
26 glViewport(x, y, width, height);
27 Aspect(width, height);
30 void Camera::FOV(float f) noexcept {
35 void Camera::Aspect(float r) noexcept {
40 void Camera::Aspect(float w, float h) noexcept {
44 void Camera::Clip(float near, float far) noexcept {
51 void Camera::UpdateProjection() noexcept {
52 projection = glm::perspective(fov, aspect, near_clip, far_clip);