All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RouteView.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 "IRouteView.h"
8 #include "RouteViewBaseComponent.h"
9 
10 namespace Eegeo
11 {
12  namespace Routes
13  {
14  namespace View
15  {
16  class RouteView : public IRouteView, private Eegeo::NonCopyable
17  {
18  public:
19 
20  RouteView(RouteViewRenderable* renderable,
21  RouteViewBaseComponent* routeViewBaseComponent);
22 
23  virtual ~RouteView();
24 
25  virtual Rendering::RenderableBase* GetRenderable() const;
26 
27  virtual const Route* GetRoute() const { return m_routeViewBaseComponent->GetRoute(); }
28 
29  virtual const Streaming::MortonKey& GetKey() const { return m_routeViewBaseComponent->GetKey(); }
30 
31  virtual void Update(const Eegeo::Rendering::RenderContext& renderContext,
32  bool depthTestEnabled,
33  bool wireframe);
34 
35  virtual size_t GetNumTriangles() const;
36 
37  virtual bool ShouldDraw() const;
38 
39  private:
40  RouteViewBaseComponent* const m_routeViewBaseComponent;
41  RouteViewRenderable* const m_renderable;
42 
43  float ComputeAltitudeFade();
44 
45  };
46  }
47  }
48 }