Apply the new ground_level method.
[crawl.git] / crawl-ref / source / ray.h
blob242c8f76f22c0eeaf0cd19540b5c25f6150f0ebf
1 /*
2 * File: ray.h
3 * Summary: Ray definition
4 */
6 #ifndef RAY_H
7 #define RAY_H
9 #include "fixedarray.h"
10 #include "geom2d.h"
12 typedef SquareArray<bool,1> reflect_grid;
14 struct ray_def
16 geom::ray r;
17 bool on_corner;
18 int cycle_idx;
20 ray_def() : on_corner(false), cycle_idx(-1) {}
21 ray_def(const geom::ray& _r)
22 : r(_r), on_corner(false), cycle_idx(-1) {}
24 coord_def pos() const;
25 bool advance();
26 void bounce(const reflect_grid &rg);
27 void regress();
29 // Get and set the direction.
30 double get_degrees() const;
31 void set_degrees(double d);
33 bool _valid() const;
36 #endif