summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/geom2d.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-31 17:25:39 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-01 21:45:25 +0100
commitd106005da5f41332ac26febe398adb0d5bb61de0 (patch)
treed3c80bc9503f4c4bc01848ad2eb6333edf1122a8 /crawl-ref/source/geom2d.h
parent5dcf2e450126f680b8c58f3921857c025803a34a (diff)
downloadcrawl-ref-d106005da5f41332ac26febe398adb0d5bb61de0.tar.gz
crawl-ref-d106005da5f41332ac26febe398adb0d5bb61de0.zip
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.
Diffstat (limited to 'crawl-ref/source/geom2d.h')
-rw-r--r--crawl-ref/source/geom2d.h5
1 files changed, 3 insertions, 2 deletions
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);
}