summaryrefslogtreecommitdiff
path: root/game
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-03-08 19:54:10 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-03-11 01:13:59 +0000
commita6cec1f8eeb54a12fb2ee058f07a451d3b549958 (patch)
tree3a4337bf6b29117fd17eecb713c420e5a1bcf8ee /game
parentCurrent tile in frustum as we loop (diff)
downloadilt-a6cec1f8eeb54a12fb2ee058f07a451d3b549958.tar.bz2
ilt-a6cec1f8eeb54a12fb2ee058f07a451d3b549958.tar.xz
ilt-a6cec1f8eeb54a12fb2ee058f07a451d3b549958.zip
Template AxisAlignedBoundingBox on unit type
Diffstat (limited to 'game')
-rw-r--r--game/geoData.h2
-rw-r--r--game/terrain.cpp2
-rw-r--r--game/terrain.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/game/geoData.h b/game/geoData.h
index a504f9b..0ff0c42 100644
--- a/game/geoData.h
+++ b/game/geoData.h
@@ -81,5 +81,5 @@ protected:
virtual void afterChange();
private:
- AxisAlignedBoundingBox extents;
+ AxisAlignedBoundingBox<GlobalDistance> extents;
};
diff --git a/game/terrain.cpp b/game/terrain.cpp
index 530b373..577d9e5 100644
--- a/game/terrain.cpp
+++ b/game/terrain.cpp
@@ -82,7 +82,7 @@ Terrain::generateMeshes()
{(surfaceKey.basePosition + 1) * TILE_SIZE || getExtents().max.z}};
}
else {
- meshItr->second.aabb = AxisAlignedBoundingBox::fromPoints(
+ meshItr->second.aabb = AxisAlignedBoundingBox<GlobalDistance>::fromPoints(
indices | std::views::transform([this](const auto vertex) -> GlobalPosition3D {
return this->point(VertexHandle {static_cast<int>(vertex)});
}));
diff --git a/game/terrain.h b/game/terrain.h
index f38fe84..5f03634 100644
--- a/game/terrain.h
+++ b/game/terrain.h
@@ -35,7 +35,7 @@ private:
glVertexArray vertexArray;
glBuffer indicesBuffer;
GLsizei count;
- AxisAlignedBoundingBox aabb;
+ AxisAlignedBoundingBox<GlobalDistance> aabb;
};
struct SurfaceKey {