#include <NIImporter_OpenDrive.h>
Definition at line 159 of file NIImporter_OpenDrive.h.
Public Member Functions | |
| std::map< int, int > | buildLaneMapping (SumoXMLTag dir) |
| unsigned int | getLaneNumber (SumoXMLTag dir) const throw () |
| OpenDriveLaneSection (SUMOReal sArg) | |
Data Fields | |
| std::map< SumoXMLTag, std::vector< OpenDriveLane > > | lanesByDir |
| SUMOReal | s |
| NIImporter_OpenDrive::OpenDriveLaneSection::OpenDriveLaneSection | ( | SUMOReal | sArg | ) | [inline] |
Definition at line 160 of file NIImporter_OpenDrive.h.
References lanesByDir, SUMO_TAG_OPENDRIVE_CENTER, SUMO_TAG_OPENDRIVE_LEFT, and SUMO_TAG_OPENDRIVE_RIGHT.
00161 : s(sArg) { 00162 lanesByDir[SUMO_TAG_OPENDRIVE_LEFT] = std::vector<OpenDriveLane>(); 00163 lanesByDir[SUMO_TAG_OPENDRIVE_RIGHT] = std::vector<OpenDriveLane>(); 00164 lanesByDir[SUMO_TAG_OPENDRIVE_CENTER] = std::vector<OpenDriveLane>(); 00165 }
| std::map<int, int> NIImporter_OpenDrive::OpenDriveLaneSection::buildLaneMapping | ( | SumoXMLTag | dir | ) | [inline] |
Definition at line 178 of file NIImporter_OpenDrive.h.
References lanesByDir, and SUMO_TAG_OPENDRIVE_RIGHT.
00178 { 00179 std::map<int, int> ret; 00180 unsigned int sumoLane = 0; 00181 const std::vector<OpenDriveLane> &dirLanes = lanesByDir.find(dir)->second; 00182 if (dir==SUMO_TAG_OPENDRIVE_RIGHT) { 00183 for (std::vector<OpenDriveLane>::const_reverse_iterator i=dirLanes.rbegin(); i!=dirLanes.rend(); ++i) { 00184 if ((*i).type=="driving") { 00185 ret[(*i).id] = sumoLane++; 00186 } 00187 } 00188 } else { 00189 for (std::vector<OpenDriveLane>::const_iterator i=dirLanes.begin(); i!=dirLanes.end(); ++i) { 00190 if ((*i).type=="driving") { 00191 ret[(*i).id] = sumoLane++; 00192 } 00193 } 00194 } 00195 return ret; 00196 }
| unsigned int NIImporter_OpenDrive::OpenDriveLaneSection::getLaneNumber | ( | SumoXMLTag | dir | ) | const throw () [inline] |
Definition at line 167 of file NIImporter_OpenDrive.h.
References lanesByDir.
00167 { 00168 unsigned int laneNum = 0; 00169 const std::vector<OpenDriveLane> &dirLanes = lanesByDir.find(dir)->second; 00170 for (std::vector<OpenDriveLane>::const_iterator i=dirLanes.begin(); i!=dirLanes.end(); ++i) { 00171 if ((*i).type=="driving") { 00172 ++laneNum; 00173 } 00174 } 00175 return laneNum; 00176 }
| std::map<SumoXMLTag, std::vector<OpenDriveLane> > NIImporter_OpenDrive::OpenDriveLaneSection::lanesByDir |
Definition at line 199 of file NIImporter_OpenDrive.h.
Referenced by buildLaneMapping(), getLaneNumber(), NIImporter_OpenDrive::myStartElement(), OpenDriveLaneSection(), and NIImporter_OpenDrive::setLaneConnections().
Definition at line 198 of file NIImporter_OpenDrive.h.
1.5.6