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

Function GetNextRoutePointIndex

libs/routing/turns_generator.cpp:211–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211bool GetNextRoutePointIndex(IRoutingResult const & result, RoutePointIndex const & index, NumMwmIds const & numMwmIds,
212 bool const forward, RoutePointIndex & nextIndex)
213{
214 if (forward)
215 {
216 if (!GetNextCrossSegmentRoutePoint(result, index, numMwmIds, nextIndex))
217 return false;
218 }
219 else
220 {
221 if (!GetPrevInSegmentRoutePoint(result, index, nextIndex))
222 return false;
223 }
224
225 ASSERT_LESS(nextIndex.m_segmentIndex, result.GetSegments().size(), ());
226 ASSERT_LESS(nextIndex.m_pathIndex, result.GetSegments()[nextIndex.m_segmentIndex].m_path.size(), ());
227 return true;
228}
229
230void RemoveUTurnCandidate(TurnInfo const & turnInfo, NumMwmIds const & numMwmIds,
231 std::vector<TurnCandidate> & turnCandidates)

Callers 2

GetPointForTurnFunction · 0.85
UNIT_TESTFunction · 0.85

Calls 3

sizeMethod · 0.45

Tested by 1

UNIT_TESTFunction · 0.68