| 276 | } |
| 277 | |
| 278 | void IndexGraph::GetSegmentCandidateForRoadPoint(RoadPoint const & rp, NumMwmId numMwmId, bool isOutgoing, |
| 279 | SegmentListT & children) const |
| 280 | { |
| 281 | RoadGeometry const & road = GetRoadGeometry(rp.GetFeatureId()); |
| 282 | if (!road.IsValid()) |
| 283 | return; |
| 284 | |
| 285 | if (!road.SuitableForOptions(m_avoidRoutingOptions)) |
| 286 | return; |
| 287 | |
| 288 | bool const bidirectional = !road.IsOneWay(); |
| 289 | auto const pointId = rp.GetPointId(); |
| 290 | |
| 291 | if ((isOutgoing || bidirectional) && pointId + 1 < road.GetPointsCount()) |
| 292 | children.emplace_back(numMwmId, rp.GetFeatureId(), pointId, isOutgoing); |
| 293 | |
| 294 | if ((!isOutgoing || bidirectional) && pointId > 0) |
| 295 | children.emplace_back(numMwmId, rp.GetFeatureId(), pointId - 1, !isOutgoing); |
| 296 | } |
| 297 | |
| 298 | void IndexGraph::GetSegmentCandidateForJoint(Segment const & parent, bool isOutgoing, SegmentListT & children) const |
| 299 | { |
nothing calls this directly
no test coverage detected