| | |
| | | DEBUG("AddMap num %d", MapNum); |
| | | } |
| | | |
| | | void AddRoadMapParent(int id, int type, const double (*points)[2], int pointNum, const int **redLine, |
| | | int redLineNum, const int **greenLine, int greenLineNum) |
| | | { |
| | | int id; |
| | | int type; |
| | | Polygon map; |
| | | int redLineNum; |
| | | Polygon *redLine; |
| | | int greenLineNum; |
| | | Polygon *greenLine; |
| | | int redAreaNum; |
| | | Polygon *redArea; |
| | | int triggerLineNum; |
| | | struct trigger_line *triggerLine; |
| | | |
| | | RoadParentMap = (struct road_exam_parent_map *)malloc(sizeof(struct road_exam_parent_map)); |
| | | RoadParentMap->id = id; |
| | | RoadParentMap->type = type; |
| | | |
| | | RoadParentMap->map.num = pointNum; |
| | | if (pointNum > 0) { |
| | | RoadParentMap->map.point = (PointF *)malloc(sizeof(PointF) * pointNum); |
| | | for (int i = 0; i < pointNum; ++i) { |
| | | RoadParentMap->map.point[i].X = points[i][0]; |
| | | RoadParentMap->map.point[i].Y = points[i][1]; |
| | | } |
| | | } |
| | | |
| | | RoadParentMap->redLineNum = redLineNum; |
| | | RoadParentMap->redLine = (Polygon *) malloc(sizeof(Polygon *)); |
| | | |
| | | for (int i = 0; i < redLineNum; ++i) { |
| | | RoadParentMap->redLine[i].num = |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | void SetCarMeasurePoint(double *basePoint, int *axial, int *left_front_tire, |
| | | int *right_front_tire, int *left_rear_tire, int *right_rear_tire, |