From a6cec1f8eeb54a12fb2ee058f07a451d3b549958 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 8 Mar 2025 19:54:10 +0000 Subject: Template AxisAlignedBoundingBox on unit type --- game/geoData.h | 2 +- game/terrain.cpp | 2 +- game/terrain.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'game') 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 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::fromPoints( indices | std::views::transform([this](const auto vertex) -> GlobalPosition3D { return this->point(VertexHandle {static_cast(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 aabb; }; struct SurfaceKey { -- cgit v1.2.3