ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/oct.h
Revision: 1.21
Committed: Thu Aug 11 19:28:45 2005 UTC (18 years, 10 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.20: +1 -2 lines
Log Message:
*** empty log message ***

File Contents

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