All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CubeMap.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "VectorMath.h"
6 #include "MortonKey.h"
7 #include "Space.h"
8 
9 namespace Eegeo
10 {
11  namespace Space
12  {
13  namespace CubeMap
14  {
15  enum
16  {
17  FacePositiveX = 0, // america
18  FaceNegativeX = 1, // india
19  FacePositiveY = 2, // north pole
20  FaceNegativeY = 3, // south pole
21  FacePositiveZ = 4, // africa
22  FaceNegativeZ = 5, // pacific
23 
24  FaceCount = 6,
25  FaceInvalid = -1
26  };
27 
28  Eegeo::dv3 FacePointToEcefNormal(int face, Eegeo::dv2 point, double faceSideLengthHalf);
29  Eegeo::dv3 FacePointToWorld(int face, Eegeo::dv2 point, double faceSideLengthHalf);
30  Eegeo::dv2 WorldPointToFace(int face, Eegeo::dv3 point, double faceSideLengthHalf);
31  Eegeo::dv2 KeyToFaceCentre(Eegeo::Streaming::MortonKey key, double faceSideLengthHalf);
33  Eegeo::Streaming::MortonKey FacePointToKey(Eegeo::dv2 point, int faceIndex, double faceSideLengthHalf, int keyDepth);
34  int WorldPointToFaceIndex(const Eegeo::dv3& point);
35 
37  int WorldPointToFaceIndex(Eegeo::dv3 point, double faceSideLengthHalf);
38 
39  Eegeo::v2 FacePointToKeyNormalised(Eegeo::Streaming::MortonKey key, Eegeo::dv2 facePoint);
40  Eegeo::Streaming::MortonKey EcefToKey(Eegeo::dv3 ecefPosition, int level);
41  }
42  }
43 }