diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-10-22 17:57:55 +0300 |
---|---|---|
committer | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-10-22 17:57:55 +0300 |
commit | fc00ee4d41d772204ff60debc3bf5f798549e1ea (patch) | |
tree | 877ace14b947bce80f22407402340638e76885f2 /routing/cross_routing_context.hpp | |
parent | ffc2669bd47fdfc2cb919a5c38f1321456d6a78b (diff) |
Tree index for cross section index finding.
Diffstat (limited to 'routing/cross_routing_context.hpp')
-rw-r--r-- | routing/cross_routing_context.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routing/cross_routing_context.hpp b/routing/cross_routing_context.hpp index 8daa188348..87b0d5e29c 100644 --- a/routing/cross_routing_context.hpp +++ b/routing/cross_routing_context.hpp @@ -3,6 +3,8 @@ #include "coding/file_container.hpp" #include "geometry/point2d.hpp" +#include "geometry/rect2d.hpp" +#include "geometry/tree4d.hpp" #include "std/string.hpp" #include "std/vector.hpp" @@ -25,6 +27,8 @@ struct IngoingCrossNode void Save(Writer & w) const; size_t Load(Reader const & r, size_t pos); + + m2::RectD const GetLimitRect() const { return m2::RectD(m_point, m_point); } }; struct OutgoingCrossNode @@ -53,6 +57,7 @@ class CrossRoutingContextReader vector<OutgoingCrossNode> m_outgoingNodes; vector<string> m_neighborMwmList; unique_ptr<Reader> mp_reader = nullptr; + m4::Tree<IngoingCrossNode> m_ingoingIndex; size_t GetIndexInAdjMatrix(IngoingEdgeIteratorT ingoing, OutgoingEdgeIteratorT outgoing) const; @@ -63,6 +68,8 @@ public: pair<IngoingEdgeIteratorT, IngoingEdgeIteratorT> GetIngoingIterators() const; + bool FindIngoingNodeByPoint(m2::PointD const & point, IngoingCrossNode & node) const; + pair<OutgoingEdgeIteratorT, OutgoingEdgeIteratorT> GetOutgoingIterators() const; WritedEdgeWeightT GetAdjacencyCost(IngoingEdgeIteratorT ingoing, |