summaryrefslogtreecommitdiff
path: root/game/geoData.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2022-01-07 18:57:08 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2022-01-07 19:02:01 +0000
commit4ef5c934aacbfce6b3c5502425975edcf61cf0e8 (patch)
tree4f7a64f173dc9bab8467f32b95eb111cf5f0f162 /game/geoData.h
parentDon't invoke CHECK parameters multiple times (diff)
downloadilt-4ef5c934aacbfce6b3c5502425975edcf61cf0e8.tar.bz2
ilt-4ef5c934aacbfce6b3c5502425975edcf61cf0e8.tar.xz
ilt-4ef5c934aacbfce6b3c5502425975edcf61cf0e8.zip
Initial commit GeoData ray tracer
Diffstat (limited to 'game/geoData.h')
-rw-r--r--game/geoData.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/game/geoData.h b/game/geoData.h
index ffb7d64..7bd6ae5 100644
--- a/game/geoData.h
+++ b/game/geoData.h
@@ -32,6 +32,19 @@ public:
[[nodiscard]] float getScale() const;
[[nodiscard]] std::span<const Node> getNodes() const;
+ class RayTracer {
+ public:
+ RayTracer(glm::vec2 p0, glm::vec2 p1, float scale);
+
+ glm::vec2 next();
+
+ private:
+ glm::vec2 p;
+ const glm::vec2 d;
+ float error;
+ glm::vec3 inc;
+ };
+
protected:
Limits limit {}; // Base grid limits first(x,y) -> second(x,y)
glm::uvec2 size {};