From c310240881e9d1b474db6ef8f8f2891ce1646795 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 7 Mar 2025 00:11:07 +0000 Subject: Position is moved to Frustum --- gfx/frustum.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gfx/frustum.h') diff --git a/gfx/frustum.h b/gfx/frustum.h index 25dcc18..46f4108 100644 --- a/gfx/frustum.h +++ b/gfx/frustum.h @@ -1,11 +1,12 @@ #pragma once +#include "config/types.h" #include #include class Frustum { public: - Frustum(const glm::mat4 & view, const glm::mat4 & projection); + Frustum(const GlobalPosition3D & pos, const glm::mat4 & view, const glm::mat4 & projection); [[nodiscard]] auto & getFrustumPlanes() const @@ -19,12 +20,19 @@ public: return viewProjection; } + [[nodiscard]] auto + getPosition() const + { + return position; + } + void updateView(const glm::mat4 & view); protected: static constexpr size_t FACES = 6; void updateCache(); + GlobalPosition3D position; glm::mat4 view, projection; glm::mat4 viewProjection, inverseViewProjection; std::array planes; -- cgit v1.2.3