Revision 1908
reorganized stuff in intersectData. made new function getTurningIntersect
that can be used to input directly into dan's code. made new functions to get
information about road nodes stored int he intersection database. eventually
should convert it to the node database.
intersectData.h | ||
---|---|---|
10 | 10 |
* Also contains a "feature id": 4 bits in positions 13,14,15,16 |
11 | 11 |
* |
12 | 12 |
****************************/ |
13 |
|
|
13 | 14 |
|
14 | 15 |
/******************************** |
16 |
* Feature TYPES: |
|
17 |
* |
|
18 |
********************************/ |
|
19 |
#define INTERSECTION_NODE (0 << 12) |
|
20 |
#define ROAD_NODE (1 << 12) |
|
21 |
|
|
22 |
/******************************** |
|
15 | 23 |
* Intersection TYPES: |
16 | 24 |
* |
17 | 25 |
********************************/ |
... | ... | |
22 | 30 |
#define INTERSECTION_OFF_RAMP (2 << 2) |
23 | 31 |
#define INTERSECTION_DOUBLE_C (3 << 2) |
24 | 32 |
#define INTERSECTION_DOUBLE_T (4 << 2) |
25 |
#define INTERSECTION_ROAD (5 << 2) /*placeholder for all roads atm, until we come up with a better solution */
|
|
33 |
#define ROAD (5 << 2) /*placeholder for all roads atm, until we come up with a better solution */
|
|
26 | 34 |
|
27 | 35 |
/******************************** |
36 |
* Intersection Types in lineDrive.h: |
|
37 |
* |
|
38 |
********************************/ |
|
39 |
#define DOUBLE 0 |
|
40 |
#define SINGLE 1 |
|
41 |
#define ON_RAMP 2 |
|
42 |
#define OFF_RAMP 3 |
|
43 |
|
|
44 |
/******************************** |
|
28 | 45 |
* Turn TYPES: |
29 | 46 |
* |
30 | 47 |
********************************/ |
... | ... | |
34 | 51 |
#define IRIGHT 2 |
35 | 52 |
#define IUTURN 3 |
36 | 53 |
|
54 |
/******************************** |
|
55 |
* Road TYPES: |
|
56 |
* |
|
57 |
********************************/ |
|
58 |
#define ROAD_DOUBLE 0 |
|
59 |
#define ROAD_SINGLE 1 |
|
60 |
#define HIGHWAY 2 |
|
37 | 61 |
|
38 | 62 |
/******************************** |
39 | 63 |
* Intersection ENTRYPOINTS: |
... | ... | |
86 | 110 |
int IntersectData[NUM_FEATURES]; |
87 | 111 |
|
88 | 112 |
void initializeData(); |
89 |
void insertIntersection(int key, int featureid, int intersect_type, int intersect_position);
|
|
113 |
void insertNode(int key, int featureid, int node_type, int node_info);
|
|
90 | 114 |
|
91 | 115 |
// Functions to get data from the Database: |
92 |
int getIntersectType(int entry); |
|
93 |
int getIntersectPos(int entry); |
|
94 |
int getFeatureId(int entry); |
|
116 |
int getIntersectType(int key); |
|
117 |
int getTurningIntersect(int key); |
|
118 |
int getIntersectPos(int key); |
|
119 |
int getFeatureId(int key); |
|
95 | 120 |
int getTurnIntType(int intersectiontype); |
121 |
int getRoadType(int key); |
|
122 |
int getRoadInfo(int key); |
|
96 | 123 |
|
97 | 124 |
#endif |
Also available in: Unified diff