summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--game/geoData.cpp12
-rw-r--r--game/geoData.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/game/geoData.cpp b/game/geoData.cpp
index d577392..4291a64 100644
--- a/game/geoData.cpp
+++ b/game/geoData.cpp
@@ -319,7 +319,7 @@ GeoData::setPoint(GlobalPosition3D tsPoint, const RelativeDistance nearNodeToler
return split_copy(face, tsPoint);
};
-std::vector<GeoData::FaceHandle>
+std::set<GeoData::FaceHandle>
GeoData::setHeights(const std::span<const GlobalPosition3D> triangleStrip, const SetHeightsOpts & opts)
{
if (triangleStrip.size() < 3) {
@@ -532,14 +532,14 @@ GeoData::setHeights(const std::span<const GlobalPosition3D> triangleStrip, const
}
}
- std::vector<FaceHandle>
+ std::set<FaceHandle>
setSurface(const Surface * surface)
{
- std::vector<FaceHandle> out;
+ std::set<FaceHandle> out;
auto surfaceStripWalk = [this, surface, &out](const auto & surfaceStripWalk, const auto & face) -> void {
- if (!geoData->property(geoData->surface, face)) {
+ if (!out.contains(face)) {
geoData->property(geoData->surface, face) = surface;
- out.emplace_back(face);
+ out.emplace(face);
std::ranges::for_each(
geoData->ff_range(face), [this, &surfaceStripWalk](const auto & adjacentFaceHandle) {
if (getTriangle(geoData->triangle<2>(adjacentFaceHandle).centroid())) {
@@ -554,7 +554,7 @@ GeoData::setHeights(const std::span<const GlobalPosition3D> triangleStrip, const
return out;
}
- std::vector<GeoData::FaceHandle>
+ std::set<GeoData::FaceHandle>
run(const SetHeightsOpts & opts)
{
const std::vector<VertexHandle> newVerts = createVerticesForStrip(opts.nearNodeTolerance);
diff --git a/game/geoData.h b/game/geoData.h
index 586b48d..b2a75bd 100644
--- a/game/geoData.h
+++ b/game/geoData.h
@@ -55,7 +55,7 @@ public:
RelativeDistance maxSlope = DEFAULT_MAX_SLOPE;
};
- std::vector<FaceHandle> setHeights(std::span<const GlobalPosition3D> triangleStrip, const SetHeightsOpts &);
+ std::set<FaceHandle> setHeights(std::span<const GlobalPosition3D> triangleStrip, const SetHeightsOpts &);
[[nodiscard]] auto
getExtents() const