Initial commit
This commit is contained in:
35
modules/world/road_map.h
Normal file
35
modules/world/road_map.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user