From 4ef5c934aacbfce6b3c5502425975edcf61cf0e8 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 7 Jan 2022 18:57:08 +0000 Subject: Initial commit GeoData ray tracer --- game/geoData.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'game/geoData.h') 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 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 {}; -- cgit v1.2.3