#ifndef VIEW_H #define VIEW_H #include #include using namespace std; #include "util.h" struct visibility_state { unsigned int generation; enum { UNKNOWN, OCCLUDED, PARTIAL, FULL } visibility; visibility_state () : generation(0), visibility(UNKNOWN) { }; }; struct view { sector orig; point p; vec3 d, u; float fov; int w, h; void draw (); // only to be used by friends TODO matrix projection; void transform (const matrix &m); struct { plane l, r, t, b, n, f; } frustum; enum { DEPTH, LIGHTED } mode; light *l; set drawn; unsigned int generation; map vismap; vector vislist; // octants partially or fully visible vector checklist; // octants possibly visible bool may_draw (entity_base *e); view (); ~view (); }; #endif