1 |
#ifndef OCT_H |
2 |
#define OCT_H |
3 |
|
4 |
#include <vector> |
5 |
|
6 |
using namespace std; |
7 |
|
8 |
#include "util.h" |
9 |
|
10 |
struct entity_base; |
11 |
|
12 |
struct octant : protected vector<entity_base *> { |
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 |
|
21 |
void add (const sector &sec2, entity_base *e); |
22 |
void remove (entity_base *e); |
23 |
|
24 |
void draw (const draw_context &ctx); |
25 |
|
26 |
octant (octant *parent, int subindex); |
27 |
~octant (); |
28 |
}; |
29 |
|
30 |
extern octant world; |
31 |
|
32 |
#endif |
33 |
|
34 |
|