| 241 | } |
| 242 | |
| 243 | void IRoadGraph::AddFakeEdges(JunctionPointT const & junction, vector<pair<Edge, JunctionPointT>> const & vicinity) |
| 244 | { |
| 245 | for (auto const & v : vicinity) |
| 246 | { |
| 247 | Edge const & ab = v.first; |
| 248 | JunctionPointT const & p = v.second; |
| 249 | |
| 250 | vector<Edge> edges; |
| 251 | SplitEdge(ab, p, edges); |
| 252 | |
| 253 | edges.push_back(Edge::MakeFake(junction, p)); |
| 254 | edges.push_back(Edge::MakeFake(p, junction)); |
| 255 | |
| 256 | ForEachFakeEdge([&](Edge const & uv) |
| 257 | { |
| 258 | if (OnEdge(p, uv)) |
| 259 | SplitEdge(uv, p, edges); |
| 260 | }); |
| 261 | |
| 262 | for (auto const & uv : edges) |
| 263 | { |
| 264 | AddOutgoingFakeEdge(uv); |
| 265 | AddIngoingFakeEdge(uv); |
| 266 | } |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | void IRoadGraph::AddOutgoingFakeEdge(Edge const & e) |
| 271 | { |