All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RouteViewFactory.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "IRouteViewFactory.h"
7 #include "Routes.h"
8 #include "Rendering.h"
9 #include "RouteRenderVertex.h"
10 #include "Positioning.h"
11 #include "LocalRouteVertex.h"
12 #include "Interiors.h"
13 
14 #include "MortonKey.h"
15 
16 #include <vector>
17 
18 namespace Eegeo
19 {
20  namespace Routes
21  {
22  namespace View
23  {
24  struct RouteViewSection;
25 
26 
28  {
29  RouteViewMeshFactory& m_routeViewMeshFactory;
30  RouteViewRenderableFactory& m_routeViewRenderableFactory;
31  Positioning::IPointOnMapFactory& m_pointOnMapFactory;
32  const Eegeo::Positioning::IPositioningViewComponent& m_positioningViewComponent;
33 
34 
35  const float m_missingTerrainAlphaMultiplier;
36 
37 
38  Rendering::Mesh* CreateMeshOrNull(IRouteViewGeometryFactory& routeViewGeometryFactory,
39  const RouteViewSection& routeViewSection,
40  const Style::RouteStyle& routeStyle,
41  const bool heightLookupFailed);
42 
43  IRouteView* CreateView(Rendering::Mesh* pMesh,
44  const Route& route,
45  const RouteViewSection& routeViewSection,
46  const Style::RouteStyle& routeStyle);
47 
48  std::vector<RouteViewSection> BuildRouteViewSections(const Fitting::FittedRoute& route, const Routes::Style::RouteStyle& routeStyle) const;
49 
50  std::vector<LocalRouteVertex> VerticesWithIndoorMapHeights(const dv3& ecefOrigin, const std::vector<LocalRouteVertex>& vertices) const;
51 
52  public:
53  RouteViewFactory(RouteViewMeshFactory& routeViewMeshFactory,
54  RouteViewRenderableFactory& routeViewRenderableFactory,
55  Positioning::IPointOnMapFactory& pointOnMapFactory,
56  const Eegeo::Positioning::IPositioningViewComponent& positioningViewComponent,
57  float missingTerrainAlphaMultiplier);
58 
60 
61  void CreateViews(const Fitting::FittedRoute& route,
62  const Routes::Style::RouteStyle& routeStyle,
63  std::vector<IRouteView*>& out_views);
64  };
65  }
66  }
67 }