rip out dedicated file for single function (minor refactor)
This commit is contained in:
parent
2501882adb
commit
7073403f1b
@ -1,22 +0,0 @@
|
|||||||
#ifndef OSRM_EXTRACTOR_GUIDANCE_INTERSECTION_SCENARIO_THREE_WAY_HPP_
|
|
||||||
#define OSRM_EXTRACTOR_GUIDANCE_INTERSECTION_SCENARIO_THREE_WAY_HPP_
|
|
||||||
|
|
||||||
#include "extractor/guidance/intersection.hpp"
|
|
||||||
|
|
||||||
namespace osrm
|
|
||||||
{
|
|
||||||
namespace extractor
|
|
||||||
{
|
|
||||||
namespace guidance
|
|
||||||
{
|
|
||||||
|
|
||||||
// Ending in a T-Intersection
|
|
||||||
bool isEndOfRoad(const ConnectedRoad &uturn,
|
|
||||||
const ConnectedRoad &possible_right_turn,
|
|
||||||
const ConnectedRoad &possible_left_turn);
|
|
||||||
|
|
||||||
} // namespace guidance
|
|
||||||
} // namespace extractor
|
|
||||||
} // namespace osrm
|
|
||||||
|
|
||||||
#endif /*OSRM_EXTRACTOR_GUIDANCE_INTERSECTION_SCENARIO_THREE_WAY_HPP_*/
|
|
@ -1,28 +0,0 @@
|
|||||||
#include "extractor/guidance/intersection_scenario_three_way.hpp"
|
|
||||||
#include "extractor/guidance/constants.hpp"
|
|
||||||
#include "extractor/guidance/toolkit.hpp"
|
|
||||||
|
|
||||||
#include "util/guidance/toolkit.hpp"
|
|
||||||
|
|
||||||
using osrm::util::guidance::angularDeviation;
|
|
||||||
|
|
||||||
namespace osrm
|
|
||||||
{
|
|
||||||
namespace extractor
|
|
||||||
{
|
|
||||||
namespace guidance
|
|
||||||
{
|
|
||||||
|
|
||||||
bool isEndOfRoad(const ConnectedRoad &,
|
|
||||||
const ConnectedRoad &possible_right_turn,
|
|
||||||
const ConnectedRoad &possible_left_turn)
|
|
||||||
{
|
|
||||||
return angularDeviation(possible_right_turn.angle, 90) < NARROW_TURN_ANGLE &&
|
|
||||||
angularDeviation(possible_left_turn.angle, 270) < NARROW_TURN_ANGLE &&
|
|
||||||
angularDeviation(possible_right_turn.angle, possible_left_turn.angle) >
|
|
||||||
2 * NARROW_TURN_ANGLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace guidance
|
|
||||||
} // namespace extractor
|
|
||||||
} // namespace osrm
|
|
@ -1,6 +1,5 @@
|
|||||||
#include "extractor/guidance/sliproad_handler.hpp"
|
#include "extractor/guidance/sliproad_handler.hpp"
|
||||||
#include "extractor/guidance/constants.hpp"
|
#include "extractor/guidance/constants.hpp"
|
||||||
#include "extractor/guidance/intersection_scenario_three_way.hpp"
|
|
||||||
#include "extractor/guidance/toolkit.hpp"
|
#include "extractor/guidance/toolkit.hpp"
|
||||||
|
|
||||||
#include "util/guidance/toolkit.hpp"
|
#include "util/guidance/toolkit.hpp"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "extractor/guidance/turn_handler.hpp"
|
#include "extractor/guidance/turn_handler.hpp"
|
||||||
#include "extractor/guidance/constants.hpp"
|
#include "extractor/guidance/constants.hpp"
|
||||||
#include "extractor/guidance/intersection_scenario_three_way.hpp"
|
|
||||||
#include "extractor/guidance/toolkit.hpp"
|
#include "extractor/guidance/toolkit.hpp"
|
||||||
|
|
||||||
#include "util/guidance/toolkit.hpp"
|
#include "util/guidance/toolkit.hpp"
|
||||||
@ -21,6 +20,18 @@ namespace extractor
|
|||||||
{
|
{
|
||||||
namespace guidance
|
namespace guidance
|
||||||
{
|
{
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
bool isEndOfRoad(const ConnectedRoad &,
|
||||||
|
const ConnectedRoad &possible_right_turn,
|
||||||
|
const ConnectedRoad &possible_left_turn)
|
||||||
|
{
|
||||||
|
return angularDeviation(possible_right_turn.angle, 90) < NARROW_TURN_ANGLE &&
|
||||||
|
angularDeviation(possible_left_turn.angle, 270) < NARROW_TURN_ANGLE &&
|
||||||
|
angularDeviation(possible_right_turn.angle, possible_left_turn.angle) >
|
||||||
|
2 * NARROW_TURN_ANGLE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TurnHandler::TurnHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
TurnHandler::TurnHandler(const util::NodeBasedDynamicGraph &node_based_graph,
|
||||||
const std::vector<QueryNode> &node_info_list,
|
const std::vector<QueryNode> &node_info_list,
|
||||||
|
Loading…
Reference in New Issue
Block a user