#ifndef OCT_H #define OCT_H #include using namespace std; #include "util.h" #include "view.h" struct octant : vector, visible { struct octant *parent; /* front 23 back 67 * 01 45 */ struct octant *sub[8]; int fill; sector orig; // center uoffs extent; // half the edge size, "radius" void add (entity *e); void remove (entity *e); enum { VIS_FULL, VIS_NONE, VIS_OCCLUDED, }; int detect_visibility (view &ctx); // is this octant actually visible? void draw_depth (view &ctx); void draw_postdepth (view &ctx); void draw_lighted (view &ctx); visibility_base *new_visibility (); void clear_visibility (visibility_base *vs); octant (octant *parent, const sector &orig, uoffs extent); ~octant (); }; extern octant world; #endif