1 #ifndef OSRM_ENGINE_ROUTING_ALGORITHMS_TILE_TURNS_HPP 2 #define OSRM_ENGINE_ROUTING_ALGORITHMS_TILE_TURNS_HPP 3 4 #include "engine/algorithm.hpp" 5 #include "engine/datafacade.hpp" 6 7 #include "util/coordinate.hpp" 8 #include "util/typedefs.hpp" 9 10 #include <vector> 11 12 namespace osrm 13 { 14 namespace engine 15 { 16 namespace routing_algorithms 17 { 18 19 // Used to accumulate all the information we want in the tile about a turn. 20 struct TurnData final 21 { 22 const util::Coordinate coordinate; 23 const int in_angle; 24 const int turn_angle; 25 const EdgeWeight weight; 26 const EdgeWeight duration; 27 const guidance::TurnInstruction turn_instruction; 28 }; 29 30 using RTreeLeaf = datafacade::BaseDataFacade::RTreeLeaf; 31 32 std::vector<TurnData> getTileTurns(const DataFacade<ch::Algorithm> &facade, 33 const std::vector<RTreeLeaf> &edges, 34 const std::vector<std::size_t> &sorted_edge_indexes); 35 36 std::vector<TurnData> getTileTurns(const DataFacade<mld::Algorithm> &facade, 37 const std::vector<RTreeLeaf> &edges, 38 const std::vector<std::size_t> &sorted_edge_indexes); 39 40 } // namespace routing_algorithms 41 } // namespace engine 42 } // namespace osrm 43 44 #endif 45