From 94f0e426bc8f298aec90fd0d4fcf6f823f8c399c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 10 Jan 2022 02:07:53 +0000 Subject: Ray Trace cursor clicks to terrain surface --- game/geoData.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'game/geoData.h') diff --git a/game/geoData.h b/game/geoData.h index a296205..42c2d9d 100644 --- a/game/geoData.h +++ b/game/geoData.h @@ -2,10 +2,13 @@ #include #include +#include #include #include #include +class Ray; + class GeoData { public: struct Node { @@ -22,6 +25,7 @@ public: void loadFromImages(const std::filesystem::path &, float scale); [[nodiscard]] glm::vec3 positionAt(glm::vec2) const; + [[nodiscard]] std::optional intersectRay(const Ray &) const; [[nodiscard]] unsigned int at(glm::ivec2) const; [[nodiscard]] unsigned int at(int x, int y) const; -- cgit v1.2.3