All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RouteVertex.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "LatLongAltitude.h"
6 #include "VectorMath.h"
7 #include "RouteVertexClassification.h"
8 #include "Routes.h"
9 #include <string>
10 
11 namespace Eegeo
12 {
13  namespace Routes
14  {
16  {
17  Space::LatLong m_location;
18  std::string m_indoorMapId;
19  int m_indoorMapFloorId;
20  Eegeo::v4 m_color;
21  float m_halfWidth;
22  float m_speed;
23  RouteVertexClassification m_classification;
24  double m_distanceFromStartInMetres;
25  double m_routeParam;
26 
27 
28  public:
29  RouteVertex(const Space::LatLong& location,
30  const std::string& indoorMapId,
31  int indoorMapFloorId,
32  const Eegeo::v4& color,
33  float halfWidth,
34  float speed,
35  RouteVertexClassification classification,
36  double distanceFromStartInMetres,
37  double routeParam)
38  :m_location(location)
39  ,m_indoorMapId(indoorMapId)
40  ,m_indoorMapFloorId(indoorMapFloorId)
41  ,m_color(color)
42  ,m_halfWidth(halfWidth)
43  ,m_speed(speed)
44  ,m_classification(classification)
45  ,m_distanceFromStartInMetres(distanceFromStartInMetres)
46  ,m_routeParam(routeParam)
47  {
48  }
49 
50  const Space::LatLong& GetLocation() const { return m_location; }
51  const std::string& GetIndoorMapId() const { return m_indoorMapId; }
52  int GetIndoorMapFloorId() const { return m_indoorMapFloorId; }
53  const Eegeo::v4& GetColor() const { return m_color; }
54  float GetHalfWidth() const { return m_halfWidth; }
55  float GetSpeed() const { return m_speed; }
56  RouteVertexClassification GetRouteVertexClassification() const { return m_classification; }
57  double GetDistanceFromStartInMetres() const { return m_distanceFromStartInMetres; }
58  double GetRouteParam() const { return m_routeParam; }
59 
60  Eegeo::dv3 ToECEF() const { return m_location.ToECEF(); }
61 
62  void FinaliseRouteParam(double routeLength);
63 
64  static RouteVertex Lerp(const RouteVertex& v0, const RouteVertex& v1, double t);
65  };
66 
67 
68  }
69 }