Ocular Engine
CameraManager.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_CORE_SCENE_CAMERA_MANAGER__H__
19 #define __H__OCULAR_CORE_SCENE_CAMERA_MANAGER__H__
20 
21 #include "Scene/Camera/Camera.hpp"
22 #include "Graphics/Shader/Uniform/UniformBuffer.hpp"
23 #include "Graphics/Shader/Uniform/UniformPerCamera.hpp"
24 #include <vector>
25 
26 //------------------------------------------------------------------------------------------
27 
32 namespace Ocular
33 {
38  namespace Core
39  {
47  {
48  friend class Camera;
49 
50  public:
51 
52  CameraManager();
53  ~CameraManager();
54 
58  void initialize();
59 
66  Camera* getMainCamera() const;
67 
72  Camera* getActiveCamera() const;
73 
82  void setMainCamera(Camera* camera);
83 
87  void setActiveCamera(Camera* camera);
88 
93  std::vector<Camera*> const& getCameras() const;
94 
95  protected:
96 
101  void addCamera(Camera* camera);
102 
109  void removeCamera(Camera* camera);
110 
111  //------------------------------------------------------------
112 
113  std::vector<Camera*> m_Cameras;
114 
115  Camera* m_MainCamera;
116  Camera* m_ActiveCamera;
117 
118  Graphics::UniformBuffer* m_UniformBuffer;
119  Graphics::UniformPerCamera m_UniformPerCamera;
120 
121  private:
122  };
123  }
127 }
132 //------------------------------------------------------------------------------------------
133 
134 #endif
Definition: CameraManager.hpp:46
void setMainCamera(Camera *camera)
Definition: CameraManager.cpp:67
Camera * getActiveCamera() const
Definition: CameraManager.cpp:62
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Camera * getMainCamera() const
Definition: CameraManager.cpp:57
The fixed struct for all Uniform data for Cameras/Views.
Definition: UniformPerCamera.hpp:41
void addCamera(Camera *camera)
Definition: CameraManager.cpp:120
Definition: Camera.hpp:79
std::vector< Camera * > const & getCameras() const
Definition: CameraManager.cpp:110
void removeCamera(Camera *camera)
Definition: CameraManager.cpp:167
Generic buffer for storing and binding of shader uniforms.
Definition: UniformBuffer.hpp:73