All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
UnfittedRouteBuilder.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Routes.h"
7 #include "Streaming.h"
8 #include "VectorMath.h"
9 #include <vector>
10 
11 namespace Eegeo
12 {
13  namespace Routes
14  {
15  class Route;
16 
17  namespace Fitting
18  {
20  {
21  public:
22  UnfittedRouteBuilder(const Route& route,
23  const Streaming::MortonKey& key,
24  const FittingTerrainProjector& fittingTerrainProjector,
25  const Eegeo::v4* pOptionalColorOverride,
26  const bool fittingAttempted,
27  const bool projectToTerrain);
28 
29 
30  FittedRoute* Create() const;
31  private:
32 
33 
34  bool InsertEdgeClippedVertexWithTerrainHeight(const Clipping::ClippedRouteVertex& vertex,
35  const Eegeo::dv3& ecefPos,
36  std::vector<LocalRouteVertex>& output) const;
37 
38  bool CreateVertexWithTerrainFromIndex(int index,const dv3& cellCentre, LocalRouteVertex& out_localRouteVertex) const;
39 
40  const Eegeo::v4& CalcVertexColour(const RouteVertex& routeVertex) const;
41 
42  const Route& m_route;
43  const Streaming::MortonKey& m_key;
44  const FittingTerrainProjector& m_fittingTerrainProjector;
45  const Eegeo::v4 m_colorOverride;
46  const bool m_useColorOverride;
47  bool m_fittingAttempted;
48  bool m_projectToTerrain;
49  };
50  }
51  }
52 }