All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
NavGraphFittingInfoForKey.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Space.h"
6 #include "Streaming.h"
7 #include "Navigation.h"
8 #include "DoublePlane.h"
9 #include "VectorMathDecl.h"
10 #include "Geometry.h"
11 #include "CubeMapCellInfo.h"
12 #include "Routes.h"
13 #include <vector>
14 
15 namespace Eegeo
16 {
17  namespace Routes
18  {
19  namespace Fitting
20  {
22  {
23  public:
25  const std::vector<const NavGraphRoadFittingInfo*>& roadSplines,
26  const std::vector<Geometry::DoublePlane>& cellBoundaryPlanes);
27 
28  virtual ~NavGraphFittingInfoForKey();
29 
30  const Streaming::MortonKey& Key() const { return m_cellInfo.GetKey(); }
31  const Space::CubeMap::CubeMapCellInfo& CellInfo() const { return m_cellInfo; }
32 
33  const std::vector<const NavGraphRoadFittingInfo*>& Values() const { return m_roadSplines; }
34 
35  bool IntersectsCell(const Geometry::SingleSphere& sphere) const;
36  float DistanceToCellBoundary(const v3& point) const;
37 
38  static float DistanceToCellBoundary(const v3& point, const dv3& cellOrigin, const std::vector<Geometry::DoublePlane>& cellBoundaryPlanes);
39 
41 
42 
43  private:
44  const Space::CubeMap::CubeMapCellInfo m_cellInfo;
45 
46  std::vector<const NavGraphRoadFittingInfo*> m_roadSplines;
47 
48  std::vector<Geometry::DoublePlane> m_cellBoundaryPlanes;
49 
50  static void CreateRoadSplines(const Resources::Roads::Navigation::NavigationGraph& navGraph, std::vector<const NavGraphRoadFittingInfo*>& out_roadSplines);
51  };
52  }
53  }
54 }