| 1136 | } |
| 1137 | |
| 1138 | void IndexRouter::PointsOnEdgesSnapping::FillDeadEndsCache(m2::PointD const & point) |
| 1139 | { |
| 1140 | auto const rect = mercator::RectByCenterXYAndSizeInMeters(point, kFirstSearchDistanceM); |
| 1141 | auto closestRoads = m_router.m_roadGraph.FindRoads(rect, [this](FeatureID const & fid) |
| 1142 | { |
| 1143 | auto const & info = fid.m_mwmId.GetInfo(); |
| 1144 | return m_router.m_numMwmIds->ContainsFile(info->GetLocalFile().GetCountryFile()); |
| 1145 | }); |
| 1146 | |
| 1147 | m_deadEnds[0].clear(); |
| 1148 | EraseIfDeadEnd(point, closestRoads, m_deadEnds[0]); |
| 1149 | |
| 1150 | vector<EdgeProjectionT> candidates; |
| 1151 | m_deadEnds[1].clear(); |
| 1152 | RoadsToNearestEdges(point, closestRoads, [this](EdgeProjectionT const & proj) |
| 1153 | { |
| 1154 | auto const segment = GetSegmentByEdge(proj.first); |
| 1155 | return !IsDeadEndCached(segment, true /* isOutgoing */, true /* useRoutingOptions */, m_graph, m_deadEnds[1]); |
| 1156 | }, candidates); |
| 1157 | } |
| 1158 | |
| 1159 | void IndexRouter::PointsOnEdgesSnapping::EraseIfDeadEnd(m2::PointD const & checkpoint, vector<RoadInfoT> & roads, |
| 1160 | std::set<Segment> & deadEnds) const |
nothing calls this directly
no test coverage detected