From 04078dbb3fe4acd09d150e016c2b2e0d5d036950 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 5 Nov 2023 13:07:32 +0000 Subject: Add methods to walk the boundary of the terrain mesh --- game/geoData.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'game/geoData.h') diff --git a/game/geoData.h b/game/geoData.h index b8561d0..15d7e24 100644 --- a/game/geoData.h +++ b/game/geoData.h @@ -78,6 +78,11 @@ public: void walk(const PointFace & from, const glm::vec2 to, const std::function & op) const; void walkUntil(const PointFace & from, const glm::vec2 to, const std::function & op) const; + void boundaryWalk(const std::function &) const; + void boundaryWalk(const std::function &, HalfedgeHandle start) const; + void boundaryWalkUntil(const std::function &) const; + void boundaryWalkUntil(const std::function &, HalfedgeHandle start) const; + [[nodiscard]] auto getExtents() const { @@ -94,6 +99,7 @@ protected: [[nodiscard]] static bool triangleContainsPoint(const glm::vec2, const Triangle<2> &); [[nodiscard]] bool triangleContainsPoint(const glm::vec2, FaceHandle) const; + [[nodiscard]] HalfedgeHandle findBoundaryStart() const; private: glm::vec3 lowerExtent {}, upperExtent {}; -- cgit v1.2.3