diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-10-31 00:29:35 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-10-31 00:29:35 +0000 |
commit | 583aa8eb078090fd48c6d6db8ee69da5ad8811fb (patch) | |
tree | 64ff5e4aa73849f9377310cb985dd79e58028b63 /game/terrain2.h | |
parent | Initial commit of findPoint on terrain (diff) | |
download | ilt-583aa8eb078090fd48c6d6db8ee69da5ad8811fb.tar.bz2 ilt-583aa8eb078090fd48c6d6db8ee69da5ad8811fb.tar.xz ilt-583aa8eb078090fd48c6d6db8ee69da5ad8811fb.zip |
Initial commit of walk/walkUtil terrain
Diffstat (limited to 'game/terrain2.h')
-rw-r--r-- | game/terrain2.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/game/terrain2.h b/game/terrain2.h index 713fe23..848c36e 100644 --- a/game/terrain2.h +++ b/game/terrain2.h @@ -21,6 +21,9 @@ public: [[nodiscard]] FaceHandle findPoint(glm::vec2) const; [[nodiscard]] FaceHandle findPoint(glm::vec2, FaceHandle start) const; + void walk(const glm::vec2 from, const glm::vec2 to, const std::function<void(FaceHandle)> & op) const; + void walkUntil(const glm::vec2 from, const glm::vec2 to, const std::function<bool(FaceHandle)> & op) const; + protected: [[nodiscard]] static bool triangleContainsPoint(const glm::vec2, const glm::vec2, const glm::vec2, const glm::vec2); [[nodiscard]] bool triangleContainsPoint(const glm::vec2, FaceHandle) const; |