forked from organicmaps/organicmaps
Moving followed_polyline to std hearers.
This commit is contained in:
parent
3d247ae401
commit
414f51395b
2 changed files with 10 additions and 3 deletions
|
@ -1,8 +1,11 @@
|
|||
#include "followed_polyline.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
|
||||
namespace routing
|
||||
{
|
||||
|
||||
using namespace std;
|
||||
using Iter = routing::FollowedPolyline::Iter;
|
||||
|
||||
Iter FollowedPolyline::Begin() const
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include "geometry/point2d.hpp"
|
||||
#include "geometry/polyline2d.hpp"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace routing
|
||||
{
|
||||
class FollowedPolyline
|
||||
|
@ -22,12 +24,14 @@ public:
|
|||
|
||||
bool IsValid() const { return (m_current.IsValid() && m_poly.GetSize() > 1); }
|
||||
m2::PolylineD const & GetPolyline() const { return m_poly; }
|
||||
|
||||
vector<double> const & GetSegDistanceMeters() const { return m_segDistance; }
|
||||
double GetTotalDistanceMeters() const;
|
||||
double GetDistanceFromStartMeters() const;
|
||||
double GetDistanceToEndMeters() const;
|
||||
double GetDistFromCurPointToRoutePointMerc() const;
|
||||
double GetDistFromCurPointToRoutePointMeters() const;
|
||||
double GetMercatorDistanceFromBegin() const;
|
||||
|
||||
/*! \brief Return next navigation point for direction widgets.
|
||||
* Returns first geometry point from the polyline after your location if it is farther then
|
||||
|
@ -72,9 +76,9 @@ private:
|
|||
/// Iterator with the current position. Position sets with UpdateProjection methods.
|
||||
mutable Iter m_current;
|
||||
/// Precalculated info for fast projection finding.
|
||||
vector<m2::ProjectionToSection<m2::PointD>> m_segProj;
|
||||
std::vector<m2::ProjectionToSection<m2::PointD>> m_segProj;
|
||||
/// Accumulated cache of segments length in meters.
|
||||
vector<double> m_segDistance;
|
||||
std::vector<double> m_segDistance;
|
||||
};
|
||||
|
||||
} // namespace routing
|
||||
|
|
Loading…
Add table
Reference in a new issue