summaryrefslogtreecommitdiff
path: root/game/geoData.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-05 13:07:32 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-05 13:07:40 +0000
commit04078dbb3fe4acd09d150e016c2b2e0d5d036950 (patch)
treea612b49c5be8104dafe403674716f3b3403e65ae /game/geoData.h
parentRefactor to further simplify line/point operations (diff)
downloadilt-04078dbb3fe4acd09d150e016c2b2e0d5d036950.tar.bz2
ilt-04078dbb3fe4acd09d150e016c2b2e0d5d036950.tar.xz
ilt-04078dbb3fe4acd09d150e016c2b2e0d5d036950.zip
Add methods to walk the boundary of the terrain mesh
Diffstat (limited to 'game/geoData.h')
-rw-r--r--game/geoData.h6
1 files changed, 6 insertions, 0 deletions
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<void(FaceHandle)> & op) const;
void walkUntil(const PointFace & from, const glm::vec2 to, const std::function<bool(FaceHandle)> & op) const;
+ void boundaryWalk(const std::function<void(HalfedgeHandle)> &) const;
+ void boundaryWalk(const std::function<void(HalfedgeHandle)> &, HalfedgeHandle start) const;
+ void boundaryWalkUntil(const std::function<bool(HalfedgeHandle)> &) const;
+ void boundaryWalkUntil(const std::function<bool(HalfedgeHandle)> &, 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 {};