diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-06 02:41:09 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-03-11 01:13:52 +0000 |
commit | ba69d51cc372197ef55feb87a33ed03afd1b0ca3 (patch) | |
tree | ce50ac42a8d30d5246ca767107d76886d7237e69 /game/water.cpp | |
parent | Pass frustum into render functions (diff) | |
download | ilt-ba69d51cc372197ef55feb87a33ed03afd1b0ca3.tar.bz2 ilt-ba69d51cc372197ef55feb87a33ed03afd1b0ca3.tar.xz ilt-ba69d51cc372197ef55feb87a33ed03afd1b0ca3.zip |
Create AxisAlignedBoundingBox
Used to define the extents of GeoData mesh
Diffstat (limited to 'game/water.cpp')
-rw-r--r-- | game/water.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/game/water.cpp b/game/water.cpp index 94a8596..527e85a 100644 --- a/game/water.cpp +++ b/game/water.cpp @@ -82,7 +82,7 @@ Water::generateMeshes() const auto pos = (p * TILE_SIZE) + GlobalPosition2D {x, y}; const auto v = vertexIndex.emplace(pos, vertices.size()); if (v.second) { - const auto cpos = glm::clamp(pos, std::get<0>(extents).xy(), std::get<1>(extents).xy()); + const auto cpos = glm::clamp(pos, extents.min.xy(), extents.max.xy()); vertices.emplace_back(geoData->positionAt(cpos)); } *out++ = static_cast<unsigned int>(v.first->second); |