summaryrefslogtreecommitdiff
path: root/game/geoData.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-03-06 02:41:09 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-03-11 01:13:52 +0000
commitba69d51cc372197ef55feb87a33ed03afd1b0ca3 (patch)
treece50ac42a8d30d5246ca767107d76886d7237e69 /game/geoData.h
parentPass frustum into render functions (diff)
downloadilt-ba69d51cc372197ef55feb87a33ed03afd1b0ca3.tar.bz2
ilt-ba69d51cc372197ef55feb87a33ed03afd1b0ca3.tar.xz
ilt-ba69d51cc372197ef55feb87a33ed03afd1b0ca3.zip
Create AxisAlignedBoundingBox
Used to define the extents of GeoData mesh
Diffstat (limited to 'game/geoData.h')
-rw-r--r--game/geoData.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/game/geoData.h b/game/geoData.h
index b2a75bd..a504f9b 100644
--- a/game/geoData.h
+++ b/game/geoData.h
@@ -2,6 +2,7 @@
#include "collections.h" // IWYU pragma: keep IterableCollection
#include "geoDataMesh.h"
+#include "gfx/aabb.h"
#include "surface.h"
#include <filesystem>
#include <glm/vec2.hpp>
@@ -57,10 +58,10 @@ public:
std::set<FaceHandle> setHeights(std::span<const GlobalPosition3D> triangleStrip, const SetHeightsOpts &);
- [[nodiscard]] auto
+ [[nodiscard]] auto &
getExtents() const
{
- return std::tie(lowerExtent, upperExtent);
+ return extents;
}
template<typename HandleT>
@@ -80,5 +81,5 @@ protected:
virtual void afterChange();
private:
- GlobalPosition3D lowerExtent {}, upperExtent {};
+ AxisAlignedBoundingBox extents;
};