From 2be260117a757288d419cf1564ccd6b91794399e Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 23 Nov 2024 14:18:56 +0000 Subject: Pass setHeights options as a struct with defaults --- game/geoData.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'game/geoData.h') 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 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 triangleStrip, const SetHeightsOpts &); [[nodiscard]] auto getExtents() const -- cgit v1.2.3