All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
AnimatedObjectsController.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "AnimatedObjects.h"
6 #include "Camera.h"
7 #include "VectorMathDecl.h"
8 #include "Models.h"
9 #include "Rendering.h"
10 
11 namespace Eegeo
12 {
13  namespace AnimatedObjects
14  {
15  const float HeightFadedIn = 5000.f;
16  const float HeightFadedOut = 8000.f;
17 
19  {
20  public:
22  Rendering::EnvironmentFlatteningService& environmentFlatteningService)
23  : m_animatedObjectsRepository(repository)
24  , m_environmentFlatteningService(environmentFlatteningService)
25  {
26  }
27 
28  void Update(float dt, const Camera::RenderCamera& renderCamera);
29 
30  private:
31 
32  void SetModelAlphaFromAltitude(const float cameraAltitude, Model& model);
33  void UpdateTransformsAndVisibility(const Camera::RenderCamera& renderCamera, AnimatedObject& animatedObject);
34 
35  AnimatedObjectsRepository& m_animatedObjectsRepository;
36  Rendering::EnvironmentFlatteningService& m_environmentFlatteningService;
37  };
38  }
39 }