MCPcopy Create free account
hub / github.com/comaps/comaps / GetNeighboringEdges

Method GetNeighboringEdges

libs/routing/index_graph.cpp:250–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250void IndexGraph::GetNeighboringEdges(astar::VertexData<Segment, RouteWeight> const & fromVertexData,
251 RoadPoint const & rp, bool isOutgoing, bool useRoutingOptions,
252 SegmentEdgeListT & edges, Parents<Segment> const & parents,
253 bool useAccessConditional) const
254{
255 RoadGeometry const & road = GetRoadGeometry(rp.GetFeatureId());
256
257 if (!road.IsValid())
258 return;
259
260 if (useRoutingOptions && !road.SuitableForOptions(m_avoidRoutingOptions))
261 return;
262
263 bool const bidirectional = !road.IsOneWay();
264 auto const & from = fromVertexData.m_vertex;
265 if ((isOutgoing || bidirectional) && rp.GetPointId() + 1 < road.GetPointsCount())
266 {
267 GetNeighboringEdge(fromVertexData, Segment(from.GetMwmId(), rp.GetFeatureId(), rp.GetPointId(), isOutgoing),
268 isOutgoing, edges, parents, useAccessConditional);
269 }
270
271 if ((!isOutgoing || bidirectional) && rp.GetPointId() > 0)
272 {
273 GetNeighboringEdge(fromVertexData, Segment(from.GetMwmId(), rp.GetFeatureId(), rp.GetPointId() - 1, !isOutgoing),
274 isOutgoing, edges, parents, useAccessConditional);
275 }
276}
277
278void IndexGraph::GetSegmentCandidateForRoadPoint(RoadPoint const & rp, NumMwmId numMwmId, bool isOutgoing,
279 SegmentListT & children) const

Callers

nothing calls this directly

Calls 8

SuitableForOptionsMethod · 0.80
SegmentClass · 0.70
GetFeatureIdMethod · 0.45
IsValidMethod · 0.45
IsOneWayMethod · 0.45
GetPointIdMethod · 0.45
GetPointsCountMethod · 0.45
GetMwmIdMethod · 0.45

Tested by

no test coverage detected