From 36d9808ed4f01d239eb8596eaf47a82e34a964d6 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 15 Mar 2026 01:39:34 +0000 Subject: Expose Camera's aspect ratio --- gfx/camera.cpp | 6 ++++++ gfx/camera.h | 1 + 2 files changed, 7 insertions(+) (limited to 'gfx') diff --git a/gfx/camera.cpp b/gfx/camera.cpp index db748e9..4d46810 100644 --- a/gfx/camera.cpp +++ b/gfx/camera.cpp @@ -23,6 +23,12 @@ Camera::setAspect(Angle aspect) Frustum::updateCache(); } +Angle +Camera::getAspect() const +{ + return aspect; +} + Ray Camera::unProject(const ScreenRelCoord & mouse) const { diff --git a/gfx/camera.h b/gfx/camera.h index b78827a..1be012b 100644 --- a/gfx/camera.h +++ b/gfx/camera.h @@ -13,6 +13,7 @@ public: [[nodiscard]] Ray unProject(const ScreenRelCoord &) const; void setAspect(Angle aspect); + Angle getAspect() const; void setPosition(const GlobalPosition3D & p) -- cgit v1.3