summaryrefslogtreecommitdiff
path: root/game/geoData.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-11-23 14:18:56 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-11-23 14:18:56 +0000
commit2be260117a757288d419cf1564ccd6b91794399e (patch)
tree3b438b34d477ee9d8f91d70585f8b74ce9471c71 /game/geoData.h
parentRemove split face specialisation (diff)
downloadilt-2be260117a757288d419cf1564ccd6b91794399e.tar.bz2
ilt-2be260117a757288d419cf1564ccd6b91794399e.tar.xz
ilt-2be260117a757288d419cf1564ccd6b91794399e.zip
Pass setHeights options as a struct with defaults
Diffstat (limited to 'game/geoData.h')
-rw-r--r--game/geoData.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/game/geoData.h b/game/geoData.h
index 5daa7a4..51bb28b 100644
--- a/game/geoData.h
+++ b/game/geoData.h
@@ -142,7 +142,16 @@ public:
[[nodiscard]] HalfedgeHandle findEntry(const GlobalPosition2D from, const GlobalPosition2D to) const;
- void setHeights(const std::span<const GlobalPosition3D> triangleStrip, const Surface &);
+ struct SetHeightsOpts {
+ static constexpr auto DEFAULT_NEAR_NODE_TOLERANACE = 500.F;
+ static constexpr auto DEFAULT_MAX_SLOPE = 0.5F;
+
+ const Surface & surface;
+ RelativeDistance nearNodeTolerance = DEFAULT_NEAR_NODE_TOLERANACE;
+ RelativeDistance maxSlope = DEFAULT_MAX_SLOPE;
+ };
+
+ void setHeights(std::span<const GlobalPosition3D> triangleStrip, const SetHeightsOpts &);
[[nodiscard]] auto
getExtents() const