diff options
author | Constantin Shalnev <c.shalnev@corp.mail.ru> | 2015-05-05 18:33:48 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:47:40 +0300 |
commit | 96cef762f1a3f11c2b813cba744de46dcfac07a8 (patch) | |
tree | 92f49f34ab2763569723ed88a68dd14e9ab342f4 /routing/road_graph_router.hpp | |
parent | dc0aba91119a2271e3d1ba71809b3b243c268b01 (diff) |
Use normal graph for pedestrian routing. Use ougoing and ingoing edges for forward and backward waves.
Diffstat (limited to 'routing/road_graph_router.hpp')
-rw-r--r-- | routing/road_graph_router.hpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/routing/road_graph_router.hpp b/routing/road_graph_router.hpp index bd6b76241b..6fbd6a7423 100644 --- a/routing/road_graph_router.hpp +++ b/routing/road_graph_router.hpp @@ -17,6 +17,7 @@ class Index; namespace routing { + class RoadGraphRouter : public IRouter { public: @@ -28,20 +29,24 @@ public: ResultCode CalculateRoute(m2::PointD const & startPoint, m2::PointD const & startDirection, m2::PointD const & finalPoint, Route & route) override; - virtual ResultCode CalculateRoute(RoadPos const & startPos, RoadPos const & finalPos, - vector<RoadPos> & route) = 0; + virtual void SetRoadGraph(unique_ptr<IRoadGraph> && roadGraph) { m_roadGraph = move(roadGraph); } inline IRoadGraph * GetGraph() { return m_roadGraph.get(); } protected: + virtual ResultCode CalculateRoute(Junction const & startPos, Junction const & finalPos, + vector<Junction> & route) = 0; + +private: /// @todo This method fits better in features_road_graph. - void GetRoadPos(m2::PointD const & pt, vector<RoadPos> & pos); + void GetClosestEdges(m2::PointD const & pt, vector<pair<Edge, m2::PointD>> & edges); bool IsMyMWM(MwmSet::MwmId const & mwmID) const; unique_ptr<IRoadGraph> m_roadGraph; unique_ptr<IVehicleModel> const m_vehicleModel; - Index const * m_pIndex; // non-owning ptr - TMwmFileByPointFn m_countryFileFn; + Index const * const m_pIndex; // non-owning ptr + TMwmFileByPointFn const m_countryFileFn; }; + } // namespace routing |