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

Function RemoveUTurnCandidate

libs/routing/turns_generator.cpp:230–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230void RemoveUTurnCandidate(TurnInfo const & turnInfo, NumMwmIds const & numMwmIds,
231 std::vector<TurnCandidate> & turnCandidates)
232{
233 Segment lastIngoingSegment;
234 if (turnInfo.m_ingoing->m_segmentRange.GetLastSegment(numMwmIds, lastIngoingSegment))
235 {
236 if (turnCandidates.front().m_segment.IsInverse(lastIngoingSegment))
237 turnCandidates.erase(turnCandidates.begin());
238 else if (turnCandidates.back().m_segment.IsInverse(lastIngoingSegment))
239 turnCandidates.pop_back();
240 }
241}
242
243/// \returns true if there is exactly 1 turn in |turnCandidates| with angle less then
244/// |kMaxForwardAngleCandidates|.

Callers 2

GetTurnDirectionBasicFunction · 0.85
GetTurnDirectionMethod · 0.85

Calls 7

GetLastSegmentMethod · 0.80
IsInverseMethod · 0.80
frontMethod · 0.80
backMethod · 0.80
eraseMethod · 0.45
beginMethod · 0.45
pop_backMethod · 0.45

Tested by

no test coverage detected