All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TransportWay.h
1 #pragma once
2 
3 #include "Transport.h"
4 #include "TransportWayId.h"
5 #include "VectorMath.h"
6 
7 #include <vector>
8 #include <string>
9 
10 namespace Eegeo
11 {
12  namespace Transport
13  {
14  struct TransportWay
15  {
16  public:
17  TransportWay();
18 
20  const TransportWayId& id,
21  const std::vector<Eegeo::dv3>& centerLinePoints,
22  const std::vector<double>& centerLineSplineParams,
23  double lengthMeters,
24  double halfWidthMeters,
25  TransportWayDirection::Type wayDirection,
26  const std::string& classification,
27  double averageSpeedKph,
28  double approximateSpeedLimitKph
29  );
30 
31  const TransportWayId& GetId() const { return m_id; }
32  const std::vector<Eegeo::dv3>& GetCenterLinePoints() const { return m_centerLinePoints; }
33  const std::vector<double>& GetCenterLineSplineParams() const { return m_centerLineSplineParams; }
34  double GetLengthMeters() const { return m_lengthMeters; }
35  double GetHalfWidthMeters() const { return m_halfWidthMeters; }
36  TransportWayDirection::Type GetWayDirection() const { return m_wayDirection; }
37  std::string GetClassification() const { return m_classification; }
38  double GetAverageSpeedKph() const { return m_averageSpeedKph; }
39  double GetApproximateSpeedLimitKph() const { return m_approximateSpeedLimitKph; }
40  dv3 GetInterpolatedPoint(double param) const;
41  dv3 GetDirectionAtInterpolatedPoint(double param) const;
42 
43  private:
44  TransportWayId m_id;
45  std::vector<Eegeo::dv3> m_centerLinePoints;
46  std::vector<double> m_centerLineSplineParams;
47  double m_lengthMeters;
48  double m_halfWidthMeters;
49  TransportWayDirection::Type m_wayDirection;
50  std::string m_classification;
51  double m_averageSpeedKph;
52  double m_approximateSpeedLimitKph;
53 
54  };
55  }
56 }