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

Method GetEndPoint

tools/openlr/helpers.cpp:100–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100m2::PointD BearingPointsSelector::GetEndPoint(Graph::Edge const & e, double distanceM) const
101{
102 if (distanceM < m_bearDistM && m_bearDistM <= distanceM + EdgeLength(e))
103 {
104 auto const edgeLen = EdgeLength(e);
105 auto const edgeBearDist = min(m_bearDistM - distanceM, edgeLen);
106 CHECK_LESS_OR_EQUAL(edgeBearDist, edgeLen, ());
107 return m_isLastPoint ? PointAtSegmentM(e.GetEndPoint(), e.GetStartPoint(), edgeBearDist)
108 : PointAtSegmentM(e.GetStartPoint(), e.GetEndPoint(), edgeBearDist);
109 }
110 return m_isLastPoint ? e.GetStartPoint() : e.GetEndPoint();
111}
112
113bool PointsAreClose(m2::PointD const & p1, m2::PointD const & p2)
114{

Callers 10

GetBearingScoreMethod · 0.45
GetBestCandidatePathsMethod · 0.45
ExpandFakeFunction · 0.45
GetStartPointMethod · 0.45
EdgeLengthFunction · 0.45
EdgesAreAlmostEqualFunction · 0.45
LogAs2GisPathFunction · 0.45

Calls 3

EdgeLengthFunction · 0.85
PointAtSegmentMFunction · 0.85
GetStartPointMethod · 0.45

Tested by

no test coverage detected