All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PointOnRoute.h
1 #pragma once
2 
3 #include "PointOnPath.h"
4 
5 namespace Eegeo
6 {
7  namespace Routes
8  {
10  {
11  public:
12  PointOnRoute(const Eegeo::Geometry::Paths::PointOnPath& pointOnRouteStep,
13  double fractionAlongRouteSection,
14  double fractionAlongRoute,
15  int routeSectionIndex,
16  int routeStepIndex,
17  bool validResult)
18  : m_pointOnRouteStep(pointOnRouteStep)
19  , m_fractionAlongRouteSection(fractionAlongRouteSection)
20  , m_fractionAlongRoute(fractionAlongRoute)
21  , m_routeSectionIndex(routeSectionIndex)
22  , m_routeStepIndex(routeStepIndex)
23  , m_validResult(validResult)
24  {
25  }
26 
27  static PointOnRoute InvalidResult()
28  {
29  return PointOnRoute(Eegeo::Geometry::Paths::PointOnPath(Eegeo::Space::LatLong::FromDegrees(0, 0), Eegeo::Space::LatLong::FromDegrees(0, 0), 0.0, 0.0, 0, 0), 0.0, 0.0, 0, 0, false);
30  }
31 
32  const Eegeo::Geometry::Paths::PointOnPath& GetPointOnPathForClosestRouteStep() const { return m_pointOnRouteStep; }
33  double GetFractionAlongRouteStep() const { return m_pointOnRouteStep.GetFractionAlongPath(); }
34  double GetFractionAlongRouteSection() const { return m_fractionAlongRouteSection; }
35  double GetFractionAlongRoute() const { return m_fractionAlongRoute; }
36  int GetRouteSectionIndex() const { return m_routeSectionIndex; }
37  int GetRouteStepIndex() const { return m_routeStepIndex; }
38  bool IsValidResult() const { return m_validResult; }
39 
40  private:
41  Eegeo::Geometry::Paths::PointOnPath m_pointOnRouteStep;
42  double m_fractionAlongRouteSection;
43  double m_fractionAlongRoute;
44  int m_routeSectionIndex;
45  int m_routeStepIndex;
46  bool m_validResult;
47 
48 
49  };
50  }
51 }