ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/oct.h
Revision: 1.22
Committed: Wed Jan 25 22:48:02 2006 UTC (18 years, 4 months ago) by root
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.21: +7 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #ifndef OCT_H
2     #define OCT_H
3    
4 root 1.2 #include <vector>
5    
6 root 1.1 using namespace std;
7    
8 root 1.2 #include "util.h"
9 root 1.12 #include "view.h"
10 root 1.2
11 root 1.21 struct octant : vector<entity *>, visible
12 root 1.14 {
13 root 1.1 struct octant *parent;
14 root 1.3 /* front 23 back 67
15     * 01 45 */
16 root 1.1 struct octant *sub[8];
17 root 1.2 int fill;
18 root 1.20 sector orig; // center
19     uoffs extent; // half the edge size, "radius"
20 root 1.1
21 root 1.11 void add (entity *e);
22     void remove (entity *e);
23 root 1.1
24 root 1.22 enum {
25     VIS_FULL,
26     VIS_NONE,
27     VIS_OCCLUDED,
28     };
29    
30     int detect_visibility (view &ctx); // is this octant actually visible?
31 root 1.20
32     void draw_depth (view &ctx);
33     void draw_postdepth (view &ctx);
34     void draw_lighted (view &ctx);
35 root 1.2
36 root 1.15 visibility_base *new_visibility ();
37     void clear_visibility (visibility_base *vs);
38 root 1.12
39 root 1.6 octant (octant *parent, const sector &orig, uoffs extent);
40 root 1.1 ~octant ();
41     };
42    
43 root 1.2 extern octant world;
44    
45 root 1.1 #endif
46 root 1.2
47