| 261 | } |
| 262 | |
| 263 | double CalcTurnAngle(IRoutingResult const & result, size_t const outgoingSegmentIndex, NumMwmIds const & numMwmIds, |
| 264 | RoutingSettings const & vehicleSettings) |
| 265 | { |
| 266 | bool const isStartFakeLoop = PathIsFakeLoop(result.GetSegments()[outgoingSegmentIndex - 1].m_path); |
| 267 | size_t const segmentIndexForIngoingPoint = isStartFakeLoop ? outgoingSegmentIndex - 1 : outgoingSegmentIndex; |
| 268 | |
| 269 | m2::PointD const ingoingPoint = |
| 270 | GetPointForTurn(result, segmentIndexForIngoingPoint, numMwmIds, vehicleSettings.m_maxIngoingPointsCount, |
| 271 | vehicleSettings.m_minIngoingDistMeters, false /* forward */); |
| 272 | m2::PointD const outgoingPoint = |
| 273 | GetPointForTurn(result, outgoingSegmentIndex, numMwmIds, vehicleSettings.m_maxOutgoingPointsCount, |
| 274 | vehicleSettings.m_minOutgoingDistMeters, true /* forward */); |
| 275 | |
| 276 | m2::PointD const junctionPoint = result.GetSegments()[outgoingSegmentIndex].m_path.front().GetPoint(); |
| 277 | return math::RadToDeg(PiMinusTwoVectorsAngle(junctionPoint, ingoingPoint, outgoingPoint)); |
| 278 | } |
| 279 | |
| 280 | void CorrectCandidatesSegmentByOutgoing(TurnInfo const & turnInfo, Segment const & firstOutgoingSeg, |
| 281 | TurnCandidates & nodes) |
no test coverage detected