47 #ifdef CHECK_MEMORY_LEAKS 49 #endif // CHECK_MEMORY_LEAKS 59 angle2 = (360 - angle2) * -1;
61 while (angle2 < -180) {
62 angle2 = 360 + angle2;
81 std::stringstream strm1(
id);
84 std::stringstream strm2;
98 std::ifstream strm(file.c_str());
100 throw ProcessError(
"Could not load names of edges too keep from '" + file +
"'.");
102 while (strm.good()) {
108 into.insert(name.substr(5));
116 std::ifstream strm(file.c_str());
118 throw ProcessError(
"Could not load IDs from '" + file +
"'.");
120 while (strm.good()) {
121 std::string prefixedID;
124 into.insert(prefixedID.substr(prefix.size()));
static void loadPrefixedIDsFomFile(const std::string &file, const std::string prefix, std::set< std::string > &into)
Add prefixed ids defined in file.
static SUMOReal normRelAngle(SUMOReal angle1, SUMOReal angle2)
ensure that reverse relAngles (>=179.999) always count as turnarounds (-180)
SUMOReal distanceTo(const Position &p2) const
returns the euclidean distance in 3 dimension
static void loadEdgesFromFile(const std::string &file, std::set< std::string > &into)
Add edge ids defined in file (either ID or edge:ID per line) into the given set.
static std::string normalIDRepresentation(const std::string &id)
converts the numerical id to its "normal" string representation
const Position & getPosition() const
static bool startsWith(const std::string &str, const std::string prefix)
Checks whether a given string starts with the prefix.
Represents a single node (junction) during network building.
static SUMOReal relAngle(SUMOReal angle1, SUMOReal angle2)
computes the relative angle between the two angles
static SUMOReal distance(NBNode *node1, NBNode *node2)
returns the distance between both nodes