summaryrefslogtreecommitdiff
path: root/game/geoData.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-03-31 12:15:47 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-03-31 20:34:12 +0100
commit944100110d8f168db3a26d26d3757819f463fdbc (patch)
tree7d8e80721ca256c9c435852e0e4873e2a4eb0fb3 /game/geoData.cpp
parentHandle almost straight edges with a simple bisect (diff)
downloadilt-944100110d8f168db3a26d26d3757819f463fdbc.tar.bz2
ilt-944100110d8f168db3a26d26d3757819f463fdbc.tar.xz
ilt-944100110d8f168db3a26d26d3757819f463fdbc.zip
Don't save original face handles
Not required, likely to change anyway.
Diffstat (limited to 'game/geoData.cpp')
-rw-r--r--game/geoData.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp
index 2339195..af7d006 100644
--- a/game/geoData.cpp
+++ b/game/geoData.cpp
@@ -395,14 +395,10 @@ GeoData::setHeights(const std::span<const GlobalPosition3D> triangleStrip)
return add_vertex(tsVert);
});
// Create new faces
- std::vector<FaceHandle> newFaces;
- newFaces.reserve(newVerts.size() - 2);
- std::transform(
- strip_begin(newVerts), strip_end(newVerts), std::back_inserter(newFaces), [this](const auto & newVert) {
- const auto [a, b, c] = newVert;
- auto faceHandle = add_face(a, b, c);
- return faceHandle;
- });
+ std::for_each(strip_begin(newVerts), strip_end(newVerts), [this](const auto & newVert) {
+ const auto [a, b, c] = newVert;
+ add_face(a, b, c);
+ });
// Extrude corners
struct Extrusion {