summaryrefslogtreecommitdiff
path: root/game/geoDataMesh.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-02-18 19:25:34 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2025-02-18 19:25:34 +0000
commit9c4b26ce6781584ddcd60da8a013ac5757ec05b1 (patch)
tree4a770728ebe00009c1de56a37f4af754ae021da6 /game/geoDataMesh.cpp
parentOnly build/run GeoDataMesh::sanityCheck for debug (diff)
downloadilt-9c4b26ce6781584ddcd60da8a013ac5757ec05b1.tar.bz2
ilt-9c4b26ce6781584ddcd60da8a013ac5757ec05b1.tar.xz
ilt-9c4b26ce6781584ddcd60da8a013ac5757ec05b1.zip
Expand new verts collection once
Before doing vertex normal recalc only, not on every insert
Diffstat (limited to 'game/geoDataMesh.cpp')
-rw-r--r--game/geoDataMesh.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/game/geoDataMesh.cpp b/game/geoDataMesh.cpp
index 60af061..8107a5e 100644
--- a/game/geoDataMesh.cpp
+++ b/game/geoDataMesh.cpp
@@ -140,3 +140,11 @@ GeoDataMesh::shouldFlip(const HalfedgeHandle next, const GlobalPosition2D startP
}
return std::nullopt;
};
+
+void
+GeoDataMesh::expandVerts(std::set<VertexHandle> & verts) const
+{
+ std::ranges::for_each(std::vector<VertexHandle>(verts.begin(), verts.end()), [&verts, this](auto vertex) {
+ std::ranges::copy(vv_range(vertex), std::inserter(verts, verts.end()));
+ });
+}