summaryrefslogtreecommitdiff
path: root/gfx/gl/camera.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-07 02:51:42 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-07 02:51:42 +0000
commitd6e99a696aa582b81018078b68f6600c8030d643 (patch)
tree5c1451bbc76c31f78ddd169fca7780a0943f5910 /gfx/gl/camera.cpp
parentReformat with new clang-format (diff)
downloadilt-d6e99a696aa582b81018078b68f6600c8030d643.tar.bz2
ilt-d6e99a696aa582b81018078b68f6600c8030d643.tar.xz
ilt-d6e99a696aa582b81018078b68f6600c8030d643.zip
WIP typedefing all the things - headers
Diffstat (limited to 'gfx/gl/camera.cpp')
-rw-r--r--gfx/gl/camera.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gfx/gl/camera.cpp b/gfx/gl/camera.cpp
index c4c9544..80feab4 100644
--- a/gfx/gl/camera.cpp
+++ b/gfx/gl/camera.cpp
@@ -5,7 +5,7 @@
#include <maths.h>
#include <ray.h>
-Camera::Camera(glm::vec3 pos, float fov, float aspect, float zNear, float zFar) :
+Camera::Camera(Position3D pos, Angle fov, Angle aspect, Distance zNear, Distance zFar) :
position {pos}, forward {::north}, up {::up}, near {zNear}, far {zFar},
projection {glm::perspective(fov, aspect, zNear, zFar)},
viewProjection {projection * glm::lookAt(position, position + forward, up)},
@@ -14,7 +14,7 @@ Camera::Camera(glm::vec3 pos, float fov, float aspect, float zNear, float zFar)
}
Ray
-Camera::unProject(const glm::vec2 & mouse) const
+Camera::unProject(const ScreenRelCoord & mouse) const
{
static constexpr const glm::vec4 screen {0, 0, 1, 1};
const auto mouseProjection = glm::lookAt(::origin, forward, up);