All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
StreamingVolumeController.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Types.h"
6 #include "Rendering.h"
7 #include "Streaming.h"
8 #include "Camera.h"
9 #include "VectorMathDecl.h"
10 #include "Geometry.h"
11 #include "DebugRendering.h"
12 #include <vector>
13 
14 namespace Eegeo
15 {
16  namespace Streaming
17  {
19  {
20  private:
21 
22  CameraFrustumStreamingVolume& m_streamingVolume;
23 
24  DebugRendering::DebugRenderer& m_debugRenderer;
25 
26  public:
27  static const double CAMERA_ALTITUDE_TO_FAR_PLANE_DISTANCE_MULTIPLIER;
28  static const double MIN_STREAMING_FAR_PLANE_DISTANCE;
29 
31  DebugRendering::DebugRenderer& debugRenderer)
32  : m_streamingVolume(streamingVolume)
33  , m_debugRenderer(debugRenderer)
34  {
35  }
36 
37  void Update(const Camera::RenderCamera& renderCamera);
38 
39  void RenderStreamingFrustum();
40 
41  void updateStreamingFrustum(
42  Geometry::Frustum &frustum,
43  const Eegeo::m44& viewProjection,
44  const dv3& cameraEcefLocation) const;
45  private:
46 
47  void updateStreamingFrustumPlanes(
48  std::vector<Geometry::Plane> &frustumPlanes,
49  const Eegeo::m44& viewProjection,
50  const dv3& cameraEcefLocation) const;
51  };
52  }
53 }