All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
DebugBuildingFootprintsController.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "VectorMath.h"
7 #include "Collision.h"
8 #include "BuildingFootprints.h"
9 #include "Rendering.h"
10 #include "DebugRendering.h"
11 #include "ICallback.h"
12 #include "CollisionVisualization.h"
13 
14 
15 #include <string>
16 #include <vector>
17 
18 namespace Eegeo
19 {
20  namespace Debug
21  {
22  namespace BuildingFootprints
23  {
25  {
26  enum Mode
27  {
28  Disabled,
29  LandmarkOrFootprint,
30  RoofOutline,
31  CentroidsInRadius,
32  MaxModes
33  };
34  public:
36  Rendering::EnvironmentFlatteningService& environmentFlatteningService,
39  Eegeo::BuildingFootprints::BuildingSelectionController& buildingSelectionController);
40 
42 
43  bool IsEnabled() const { return m_mode != Disabled; }
44  void CycleMode();
45  std::string GetModeDescription() const;
46 
47  void PerformQueryAtPickedPoint(const Eegeo::dv3& rayOrigin, const Eegeo::dv3& rayDirection);
48 
49  private:
50  void HandleFootprintsInRadius(const Eegeo::BuildingFootprints::BuildingFootprintServiceQueryResult& result);
51  void HandleHighlightRoofOutlines(const Eegeo::BuildingFootprints::BuildingFootprintServiceQueryResult& result);
52  void DrawFootprintCentroid(const Eegeo::BuildingFootprints::BuildingFootprint& footprint);
53  void DrawFootprintRoofOutline(const Eegeo::BuildingFootprints::BuildingFootprint& footprint);
54  void SelectLandmarkOrFootprint(const Eegeo::Collision::RayCasterResult& pickResult);
55  void HighlightRoofOutlines(const Eegeo::Collision::RayCasterResult& pickResult);
56  void OnModeChanged();
57 
58 
60  Eegeo::DebugRendering::DebugRenderer& m_debugRenderer;
61 
62  Eegeo::BuildingFootprints::BuildingFootprintService& m_buildingFootprintService;
63  Eegeo::BuildingFootprints::BuildingSelectionController& m_buildingSelectionController;
64  Mode m_mode;
65 
68 
69  };
70  }
71  }
72 }