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

Method GetPossibleTurns

libs/routing/directions_engine_helpers.cpp:27–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void RoutingEngineResult::GetPossibleTurns(SegmentRange const & segmentRange, m2::PointD const & junctionPoint,
28 size_t & ingoingCount, turns::TurnCandidates & outgoingTurns) const
29{
30 CHECK(!segmentRange.IsEmpty(),
31 ("SegmentRange presents a fake feature.", "junctionPoint:", mercator::ToLatLon(junctionPoint)));
32
33 ingoingCount = 0;
34 outgoingTurns.candidates.clear();
35
36 auto const adjacentEdges = m_adjacentEdges.find(segmentRange);
37 if (adjacentEdges == m_adjacentEdges.cend())
38 {
39 ASSERT(false, (segmentRange));
40 return;
41 }
42
43 ingoingCount = adjacentEdges->second.m_ingoingTurnsCount;
44 outgoingTurns = adjacentEdges->second.m_outgoingTurns;
45}
46
47geometry::PointWithAltitude RoutingEngineResult::GetStartPoint() const
48{

Callers 3

GetTurnDirectionBasicFunction · 0.45
GetTurnDirectionMethod · 0.45

Calls 6

ASSERTFunction · 0.85
ToLatLonFunction · 0.50
IsEmptyMethod · 0.45
clearMethod · 0.45
findMethod · 0.45
cendMethod · 0.45

Tested by

no test coverage detected