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

Method GetNearestTurn

libs/routing/route.cpp:289–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287}
288
289void Route::GetNearestTurn(double & distanceToTurnMeters, TurnItem & turn) const
290{
291 // Note. |m_poly.GetCurrentIter().m_ind| is a point index of last passed point at |m_poly|.
292 GetClosestTurnAfterIdx(m_poly.GetCurrentIter().m_ind, turn);
293 CHECK_LESS(m_poly.GetCurrentIter().m_ind, turn.m_index, ());
294
295 distanceToTurnMeters = m_poly.GetDistanceM(m_poly.GetCurrentIter(), m_poly.GetIterToIndex(turn.m_index));
296}
297
298optional<turns::TurnItem> Route::GetCurrentIteratorTurn() const
299{

Callers 4

GetDistanceToNextTurnMethod · 0.80
GetRouteFollowingInfoMethod · 0.80
UNIT_TESTFunction · 0.80
UNIT_TESTFunction · 0.80

Calls 3

GetCurrentIterMethod · 0.80
GetIterToIndexMethod · 0.80
GetDistanceMMethod · 0.45

Tested by 2

UNIT_TESTFunction · 0.64
UNIT_TESTFunction · 0.64