| 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.15 |
struct octant : vector<entity *>, recv_occ_query, 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.3 |
sector orig; |
| 19 |
|
|
uoffs extent; |
| 20 |
root |
1.1 |
|
| 21 |
root |
1.11 |
void add (entity *e); |
| 22 |
|
|
void remove (entity *e); |
| 23 |
root |
1.1 |
|
| 24 |
root |
1.19 |
bool detect_visibility (view &ctx); // is this octant actually visible? |
| 25 |
root |
1.8 |
void display (view &ctx); |
| 26 |
root |
1.2 |
|
| 27 |
root |
1.12 |
void event (occ_query &ev); |
| 28 |
root |
1.15 |
visibility_base *new_visibility (); |
| 29 |
|
|
void clear_visibility (visibility_base *vs); |
| 30 |
root |
1.12 |
|
| 31 |
root |
1.6 |
octant (octant *parent, const sector &orig, uoffs extent); |
| 32 |
root |
1.1 |
~octant (); |
| 33 |
|
|
}; |
| 34 |
|
|
|
| 35 |
root |
1.2 |
extern octant world; |
| 36 |
|
|
|
| 37 |
root |
1.1 |
#endif |
| 38 |
root |
1.2 |
|
| 39 |
|
|
|