From d0aceb54752078200bc75a96888ffaf7483678cb Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 7 Mar 2025 00:43:25 +0000 Subject: Add function to test if an AABB is visible in a frustum --- gfx/frustum.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gfx/frustum.h') diff --git a/gfx/frustum.h b/gfx/frustum.h index 46f4108..5ee7d2c 100644 --- a/gfx/frustum.h +++ b/gfx/frustum.h @@ -4,6 +4,8 @@ #include #include +class AxisAlignedBoundingBox; + class Frustum { public: Frustum(const GlobalPosition3D & pos, const glm::mat4 & view, const glm::mat4 & projection); @@ -28,6 +30,8 @@ public: void updateView(const glm::mat4 & view); + [[nodiscard]] bool contains(const AxisAlignedBoundingBox &) const; + protected: static constexpr size_t FACES = 6; void updateCache(); -- cgit v1.2.3