From 95eed94c9294f719724283e672cc7c83b2abd282 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 7 Jan 2024 01:10:26 +0000 Subject: Unified crossProduct --- gfx/gl/camera.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gfx/gl/camera.cpp') diff --git a/gfx/gl/camera.cpp b/gfx/gl/camera.cpp index d362b94..0bc911a 100644 --- a/gfx/gl/camera.cpp +++ b/gfx/gl/camera.cpp @@ -31,8 +31,8 @@ Camera::updateView() Direction3D Camera::upFromForward(const Direction3D & forward) { - const auto right = glm::cross(forward, ::down); - return glm::cross(forward, right); + const auto right = crossProduct(forward, ::down); + return crossProduct(forward, right); } std::array -- cgit v1.2.3 From 6a1df3dfbae98a05e74c646cc216fbc19ffdb6d6 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 7 Jan 2024 13:04:31 +0000 Subject: Template Ray on position type --- gfx/gl/camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gfx/gl/camera.cpp') diff --git a/gfx/gl/camera.cpp b/gfx/gl/camera.cpp index 0bc911a..fb711dd 100644 --- a/gfx/gl/camera.cpp +++ b/gfx/gl/camera.cpp @@ -13,7 +13,7 @@ Camera::Camera(GlobalPosition3D pos, Angle fov, Angle aspect, GlobalDistance zNe updateView(); } -Ray +Ray Camera::unProject(const ScreenRelCoord & mouse) const { static constexpr const glm::vec4 screen {0, 0, 1, 1}; -- cgit v1.2.3