All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
GlobeCameraTerrainFollower.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "GlobeCamera.h"
7 #include "VectorMathDecl.h"
8 #include "Terrain.h"
9 
10 namespace Eegeo
11 {
12  namespace Camera
13  {
14  namespace GlobeCamera
15  {
17  {
18  public:
21  float maxHeightDelta,
22  float smoothingTimeConstant);
23 
24  bool MovePointTowardsTerrainSurface(float deltaSeconds, const dv3& pointEcef, dv3& out_pointEcef) const;
25  bool SnapPointToTerrainSurface(const dv3& pointEcef, dv3& out_pointEcef) const;
26  private:
27  float CalculateSmoothedTerrainHeight(float deltaSeconds, float currentTerrainHeight, float targetTerrainHeight) const;
28 
30  const float m_maxHeightDelta;
31  const float m_smoothingTimeConstant;
32  };
33  }
34  }
35 }