dEngine
Simple 2D C++ game engine
CameraManager.h
Go to the documentation of this file.
1 #ifndef DENGINE_CAMERAMANAGER_H
2 #define DENGINE_CAMERAMANAGER_H
3 #include "Camera.h"
4 #include <string>
5 #include <map>
6 #include <memory>
7 #include "Game.h"
8 #include "../Universal.h"
9 
10 namespace dengine {
11  class CameraManager {
12  public:
13  std::shared_ptr <Camera> GetCameraByName(std::string cameraName);
14 
15  std::shared_ptr <Camera> CreateCamera(std::string name, int x, int y, int height, int width);
16 
17  std::shared_ptr <Camera> GetMainCamera();
18 
19  bool CameraExists(std::string cameraName); //TODO: Implement this
20  static CameraManager &GetInstance();
21 
22  private:
23  const std::string MainCamera = "MainCamera";
25  std::map <std::string, std::shared_ptr<Camera>> cameraCollection;
26  };
27 }
28 
29 #endif //DENGINE_CAMERAMANAGER_H
static CameraManager * instance
Definition: CameraManager.h:24
Definition: CameraManager.h:11
const std::string MainCamera
Definition: CameraManager.h:23
std::shared_ptr< Camera > GetMainCamera()
Definition: CameraManager.cpp:23
std::shared_ptr< Camera > CreateCamera(std::string name, int x, int y, int height, int width)
Definition: CameraManager.cpp:14
std::map< std::string, std::shared_ptr< Camera > > cameraCollection
Definition: CameraManager.h:25
static CameraManager & GetInstance()
Definition: CameraManager.cpp:7
The namespace containing the engine&#39;s code.
Definition: Collider.h:9
bool CameraExists(std::string cameraName)
std::shared_ptr< Camera > GetCameraByName(std::string cameraName)
Definition: CameraManager.cpp:33