All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
BlueSphereView.h
1 // Copyright eeGeo Ltd (2012-2015), All Rights Reserved
2 
3 #pragma once
4 
5 #include "BlueSphere.h"
6 #include "IRenderableFilter.h"
7 #include "Types.h"
8 #include "Rendering.h"
9 #include "VectorMath.h"
10 #include "BlueSphereViewStyle.h"
11 
12 #include <string>
13 
14 namespace Eegeo
15 {
16  namespace BlueSphere
17  {
19  {
20  public:
21 
22  static BlueSphereView* Create();
23 
24  ~BlueSphereView();
25 
26  void SetVisible(bool visible);
27  void SetScale(float scaleParam);
28  void SetTransitionValue(float transitionParam);
29  void Update(float dt);
30  void EnqueueRenderables(const Eegeo::Rendering::RenderContext& renderContext, Eegeo::Rendering::RenderQueue& renderQueue);
31  void SetBlueSphereTransform(const Eegeo::m44& modelViewProjection, const Eegeo::m44& modelViewProjectionArrow);
32  void SetBlueSphereStyle(const std::string& currentVisualMapTime, const std::string& currentVisualMapWeather, const int environmentScale);
33  void SetLocationServiceState(bool isConnected);
34  void SetDepthTesting(bool depthTestEnabled);
35  void SetInInterior(bool inInterior);
36  void ShowOrientation(bool showOrientationArrow);
37 
38  // TODO: Remove deprecated method once no longer used in dependent apps
39  void UpdateBlueSphereRenderingLayer(bool inInterior);
40 
41  void OnResourcesLoaded(const BlueSphereViewResources& blueSphereViewResources);
42 
43  private:
45  bool visible,
46  float transitionParam,
47  float scaleParam,
48  bool isInInterior,
49  bool isLocationServiceConnected,
50  Eegeo::v4 highlightColor,
51  Eegeo::v4 hiddenColor,
52  Eegeo::v4 mainColor,
53  float colorLerpValue,
54  float textureLerpValue
55  );
56 
57  bool m_visible;
58  float m_transitionParam;
59  float m_scaleParam;
60  bool m_isInInterior;
61  bool m_showOrientationArrow;
62  bool m_isLocationServiceConnected;
63  bool m_depthTestEnabled;
64 
65  Eegeo::v4 m_highlightColor;
66  Eegeo::v4 m_hiddenColor;
67  Eegeo::v4 m_mainColor;
68  float m_colorLerpValue;
69  float m_textureLerpValue;
70 
71  BlueSphereMeshRenderable* m_pBlueSphereSphere;
72  BlueSphereMeshRenderable* m_pBlueSphereArrow;
73  BlueSphereMaterial* m_pBlueSphereMaterial;
74 
75  BlueSphereMeshRenderable* m_pBlueSphereNotHiddenSphere;
76  BlueSphereMeshRenderable* m_pBlueSphereNotHiddenArrow;
77  BlueSphereNotHiddenMaterial* m_pBlueSphereNotHiddenMaterial;
78 
79  BlueSphereMeshRenderable* m_pBlueSphereHiddenSphere;
80  BlueSphereMeshRenderable* m_pBlueSphereHiddenArrow;
81  BlueSphereHiddenMaterial* m_pBlueSphereHiddenMaterial;
82 
83  BlueSphereMeshRenderable* m_pBlueSphereHighlightSphere;
84  BlueSphereMeshRenderable* m_pBlueSphereHighlightArrow;
85  BlueSphereHighlightMaterial* m_pBlueSphereHighlightMaterial;
86 
87  BlueSphereMeshRenderable* m_pBlueSphereStencilClearSphere;
88  BlueSphereMeshRenderable* m_pBlueSphereStencilClearArrow;
89  BlueSphereStencilClearMaterial* m_pBlueSphereStencilClearMaterial;
90 
91  bool m_hasResources;
92  bool m_modelTransformsChanged;
93 
94  Eegeo::m44 m_modelViewProjectionSphere;
95  Eegeo::m44 m_modelViewProjectionArrow;
96  };
97 
98  }
99 }