OpenPolygon  1.0.0
OpenPolygon is a Rendering Engine
cameramanager.h
1 /*
2  Copyright (C) 2014 - 2016 Mutzii
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 
17 */
18 #ifndef CAMERAMANAGER_H
19 #define CAMERAMANAGER_H
20 
21 #include "index.h"
22 #include "camera.h"
23 
24 namespace Engine
25 {
37  {
38  public:
39 
43  using Cameras = std::list< Camera * >;
44 
48  using CameraMap = std::map< uint , Camera * >;
49 
50  private:
51 
52  static CameraManager * ptrInstance;
54  CameraManager();
55  CameraManager(const CameraManager & ){}
56  void operator=( const CameraManager &){}
57 
58  public:
59 
65  static CameraManager * getSingletonPtr(void);
66  void finish(void);
67 
74  Camera * createCamera(void);
75 
85  Camera * createCamera( const std::string & camera_name , const Vector4f & scissor_values );
86 
93  Camera * getCamera( const std::string & camera_name );
94 
101  Camera * getCamera( uint component_id );
102 
108  Cameras getCameras(void);
109 
115  void addCamera( Camera * camera );
116 
123  void BindCamera( uint component_id , Camera * camera );
124 
130  void remove( Camera * camera );
131 
132  private:
133 
134  Cameras mCameras;
135  CameraMap mCamMap;
137  };
138 
139 }
140 #endif // CAMERAMANAGER_H
std::map< uint, Camera * > CameraMap
Definition: cameramanager.h:48
std::list< Camera * > Cameras
Definition: cameramanager.h:43
void BindCamera(uint component_id, Camera *camera)
BindCamera.
Definition: CameraManager.cpp:70
Definition: element.h:23
Camera * createCamera(void)
createCamera
Definition: CameraManager.cpp:51
Cameras getCameras(void)
getCameras
Camera * getCamera(const std::string &camera_name)
getCamera
Definition: CameraManager.cpp:75
void addCamera(Camera *camera)
addCamera
Definition: CameraManager.cpp:97
static CameraManager * getSingletonPtr(void)
getSingletonPtr
Definition: CameraManager.cpp:27
The CameraManager controlled Cameras.
Definition: cameramanager.h:36