diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-07 13:23:27 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-07 13:23:27 +0000 |
commit | 108bf5b2424da06aa2e1735ffd10a2b713834db8 (patch) | |
tree | af0918a6a266aa7e6ee1d8129df6d5ef9fc4f8ab /gfx/gl | |
parent | Remove more use of legacy types and unnecessary pointers from selectable inte... (diff) | |
parent | Remove Position3D from RailVehicle (diff) | |
download | ilt-108bf5b2424da06aa2e1735ffd10a2b713834db8.tar.bz2 ilt-108bf5b2424da06aa2e1735ffd10a2b713834db8.tar.xz ilt-108bf5b2424da06aa2e1735ffd10a2b713834db8.zip |
Merge branch 'template-types'
Diffstat (limited to 'gfx/gl')
-rw-r--r-- | gfx/gl/camera.cpp | 6 | ||||
-rw-r--r-- | gfx/gl/camera.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gfx/gl/camera.cpp b/gfx/gl/camera.cpp index d362b94..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<GlobalPosition3D> Camera::unProject(const ScreenRelCoord & mouse) const { static constexpr const glm::vec4 screen {0, 0, 1, 1}; @@ -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<GlobalPosition4D, 4> diff --git a/gfx/gl/camera.h b/gfx/gl/camera.h index eca7b8f..8d53261 100644 --- a/gfx/gl/camera.h +++ b/gfx/gl/camera.h @@ -15,7 +15,7 @@ public: return viewProjection; } - [[nodiscard]] Ray unProject(const ScreenRelCoord &) const; + [[nodiscard]] Ray<GlobalPosition3D> unProject(const ScreenRelCoord &) const; void setPosition(const GlobalPosition3D & p) |