Files
academy2/modules/world/road_map.h
2021-07-31 03:37:28 +03:00

36 lines
605 B
C++

#include <core/object.h>
class RoadMap: public Object {
GDCLASS(RoadMap, Object)
public:
RoadMap();
~RoadMap();
static RoadMap *get_singleton();
static void create_singleton();
static void destroy_singleton();
protected:
Vector<int> vertices;
struct segment {
int v1, v2;
uint32_t flags;
};
Vector<segment> segments;
struct intersection {
#define MAX_NEIGHBORS 4
int neighbors[MAX_NEIGHBORS];
int ncount;
uint32_t flags;
};
Vector<intersection> intersections;
/* cylindric area to define road */
struct area {
int x, z;
int radius;
int type;
};
Vector<area> areas;
};