dEngine
Simple 2D C++ game engine
Camera.h
Go to the documentation of this file.
1 //
2 // Created by ernes on 7/1/2023.
3 //
4 
5 #ifndef DENGINE_CAMERA_H
6 #define DENGINE_CAMERA_H
7 #include <SDL.h>
8 #include <string>
9 
10 namespace dengine {
16  class Camera {
17  public:
28  Camera(std::string name, int x, int y, int height, int width);
29 
37  Camera(std::string name, int height, int width);
38 
43  std::string GetName();
44 
50  void SetPosition(int x, int y);
51 
52  private:
53  SDL_Rect pos;
54  std::string name;
55  };
56 }
57 
58 #endif //DENGINE_CAMERA_H
Camera(std::string name, int x, int y, int height, int width)
Constructor.
Definition: Camera.cpp:5
void SetPosition(int x, int y)
Set camera position.
Definition: Camera.cpp:15
std::string GetName()
Get Camera Name.
Definition: Camera.cpp:20
SDL_Rect pos
Definition: Camera.h:53
A camera.
Definition: Camera.h:16
The namespace containing the engine&#39;s code.
Definition: Collider.h:9
std::string name
Definition: Camera.h:54