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

Method MakeFakeEnding

libs/routing/guides_graph.cpp:138–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138FakeEnding GuidesGraph::MakeFakeEnding(Segment const & segment, m2::PointD const & point,
139 geometry::PointWithAltitude const & projection) const
140{
141 auto const & frontJunction = GetJunction(segment, true /* front */);
142 auto const & backJunction = GetJunction(segment, false /* front */);
143
144 FakeEnding ending;
145 ending.m_projections.emplace_back(
146 segment, false /* isOneWay */, frontJunction, backJunction,
147 LatLonWithAltitude(mercator::ToLatLon(projection.GetPoint()), projection.GetAltitude()) /* junction */);
148
149 ending.m_originJunction =
150 LatLonWithAltitude(mercator::ToLatLon(point), static_cast<geometry::Altitude>(kZeroAltitude));
151 return ending;
152}
153
154std::pair<LatLonWithAltitude, LatLonWithAltitude> GuidesGraph::GetFromTo(Segment const & segment) const
155{

Callers 1

ConnectToGuidesGraphMethod · 0.80

Calls 5

LatLonWithAltitudeClass · 0.85
ToLatLonFunction · 0.50
emplace_backMethod · 0.45
GetPointMethod · 0.45
GetAltitudeMethod · 0.45

Tested by

no test coverage detected