ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/view.h
Revision: 1.12
Committed: Wed Oct 6 00:55:37 2004 UTC (19 years, 8 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.11: +11 -13 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #ifndef VIEW_H
2     #define VIEW_H
3    
4     #include <set>
5 root 1.4 #include <map>
6 root 1.1
7     using namespace std;
8    
9     #include "util.h"
10    
11 root 1.12 struct visibility_state {
12     unsigned int generation;
13     enum { UNKNOWN, OCCLUDED, PARTIAL, FULL } visibility;
14    
15     visibility_state () : generation(0), visibility(UNKNOWN) { };
16     };
17    
18 root 1.2 struct view {
19     sector orig;
20     point p;
21     vec3 d, u;
22     float fov;
23     int w, h;
24    
25 root 1.12 void draw ();
26 root 1.4
27 root 1.12 // only to be used by friends TODO
28 root 1.5
29 root 1.8 matrix projection;
30 root 1.9
31 root 1.11 void transform (const matrix &m);
32    
33 root 1.5 struct {
34     plane l, r, t, b, n, f;
35     } frustum;
36 root 1.1 enum { DEPTH, LIGHTED } mode;
37     light *l;
38     set<entity_base *> drawn;
39 root 1.4
40     unsigned int generation;
41     map<octant *, visibility_state> vismap;
42 root 1.6 vector<octant *> vislist; // octants partially or fully visible
43     vector<octant *> checklist; // octants possibly visible
44 root 1.1
45     bool may_draw (entity_base *e);
46    
47 root 1.12 view ();
48     ~view ();
49 root 1.1 };
50 root 1.7
51 root 1.1 #endif
52