From d106005da5f41332ac26febe398adb0d5bb61de0 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Sat, 31 Oct 2009 17:25:39 +0100 Subject: Make nextcell and movehalfcell methods of geom::ray. Seems sensible given they modify the ray, even if it's not really something intrinsic to a ray. --- crawl-ref/source/geom2d.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/geom2d.h') diff --git a/crawl-ref/source/geom2d.h b/crawl-ref/source/geom2d.h index 37b62745df..f1e2310bf4 100644 --- a/crawl-ref/source/geom2d.h +++ b/crawl-ref/source/geom2d.h @@ -31,6 +31,7 @@ struct form // A ray in two-dimensional space given by starting point // and direction vector. // The points of R are start + t*dir. +struct grid; struct ray { vector start; @@ -42,6 +43,8 @@ struct ray vector shoot(double t) const; void advance(double t); + void move_half_cell(const grid &g); + bool to_next_cell(const grid& g); }; // A line in two-dimensional space as the preimage of a number @@ -76,8 +79,6 @@ struct grid double intersect(const ray &r, const line &l); double nextintersect(const ray &r, const lineseq &ls); -bool nextcell(ray &r, const grid &g); -void movehalfcell(ray &r, const grid &g); } -- cgit v1.2.3-54-g00ecf