ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libgender/oct.h
Revision: 1.17
Committed: Sat Oct 16 23:23:21 2004 UTC (19 years, 7 months ago) by root
Content type: text/plain
Branch: MAIN
Changes since 1.16: +1 -0 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 *>, recv_occ_query, 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;
19 uoffs extent;
20 gl::vertex_buffer_object vb_bbox;
21
22 void add (entity *e);
23 void remove (entity *e);
24
25 bool detect_visibility (view &ctx); // is this octant actually visible?
26 void display (view &ctx);
27
28 void event (occ_query &ev);
29 visibility_base *new_visibility ();
30 void clear_visibility (visibility_base *vs);
31
32 octant (octant *parent, const sector &orig, uoffs extent);
33 ~octant ();
34 };
35
36 extern octant world;
37
38 #endif
39
40