All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CubeMapCellHelpers.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 "Geometry.h"
8 #include "VectorMathDecl.h"
9 #include <vector>
10 
11 namespace Eegeo
12 {
13  namespace Space
14  {
15  namespace CubeMapCellHelpers
16  {
17  void CalculateLatLongCellCorners(const CubeMap::CubeMapCellInfo& cellInfo, std::vector<Space::LatLong>& out_latLongCellCorners);
18 
19  void CalculateCellBoundaryPlanes(const CubeMap::CubeMapCellInfo& cellInfo, std::vector<Geometry::DoublePlane>& out_planes);
20 
21  void CalculateCellSplitPlanes(const Streaming::MortonKey& key, Geometry::DoublePlane& splitPlaneRightPositive, Geometry::DoublePlane& out_splitPlaneTopPositive);
22 
23  void CalculateLatLongBounds(const CubeMap::CubeMapCellInfo& cellInfo, Space::LatLong& out_southWestLatLong, Space::LatLong& out_northEastLatLong);
24 
25  bool LineSegmentIntersectsWithCubeFaceEdge(const dv3& ecefPointA, const dv3& ecefPointB, const int cubeFaceIndex, double& out_closestIntersectionParam);
26 
27  bool SphereIntersectsCell(const Geometry::Sphere& sphere, const std::vector<Geometry::DoublePlane>& cellBoundingPlanes);
28  };
29  }
30 }