ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/view.h
Revision: 1.4
Committed: Mon Oct 4 07:04:58 2004 UTC (19 years, 8 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.3: +11 -0 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.2 struct view {
12     sector orig;
13     point p;
14     vec3 d, u;
15     float fov;
16     int w, h;
17    
18     void draw (draw_context &ctx);
19     };
20    
21 root 1.4 struct visibility_state {
22     unsigned int generation;
23     enum { OCCLUDED, VISIBLE } visibility;
24    
25     visibility_state () : generation(0), visibility(OCCLUDED) { };
26     };
27    
28 root 1.1 struct draw_context {
29 root 1.3 gl_matrix projection;
30 root 1.2 view &v;
31 root 1.1 enum { DEPTH, LIGHTED } mode;
32     light *l;
33     set<entity_base *> drawn;
34 root 1.4
35     unsigned int generation;
36     map<octant *, visibility_state> vismap;
37 root 1.1
38     bool may_draw (entity_base *e);
39    
40 root 1.2 draw_context (view &v);
41 root 1.1 ~draw_context ();
42     };
43    
44     #endif
45