ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/view.h
(Generate patch)

Comparing libgender/view.h (file contents):
Revision 1.11 by root, Wed Oct 6 00:27:01 2004 UTC vs.
Revision 1.12 by root, Wed Oct 6 00:55:37 2004 UTC

6 6
7using namespace std; 7using namespace std;
8 8
9#include "util.h" 9#include "util.h"
10 10
11struct visibility_state {
12 unsigned int generation;
13 enum { UNKNOWN, OCCLUDED, PARTIAL, FULL } visibility;
14
15 visibility_state () : generation(0), visibility(UNKNOWN) { };
16};
17
11struct view { 18struct view {
12 sector orig; 19 sector orig;
13 point p; 20 point p;
14 vec3 d, u; 21 vec3 d, u;
15 float fov; 22 float fov;
16 int w, h; 23 int w, h;
17 24
18 void draw (draw_context &ctx); 25 void draw ();
19};
20 26
21struct visibility_state { 27 // only to be used by friends TODO
22 unsigned int generation;
23 enum { UNKNOWN, OCCLUDED, PARTIAL, FULL } visibility;
24
25 visibility_state () : generation(0), visibility(UNKNOWN) { };
26};
27
28struct draw_context {
29 view &v;
30 28
31 matrix projection; 29 matrix projection;
32 30
33 void transform (const matrix &m); 31 void transform (const matrix &m);
34 32
44 vector<octant *> vislist; // octants partially or fully visible 42 vector<octant *> vislist; // octants partially or fully visible
45 vector<octant *> checklist; // octants possibly visible 43 vector<octant *> checklist; // octants possibly visible
46 44
47 bool may_draw (entity_base *e); 45 bool may_draw (entity_base *e);
48 46
49 draw_context (view &v); 47 view ();
50 ~draw_context (); 48 ~view ();
51}; 49};
52 50
53#endif 51#endif
54 52

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines