The Table Engine
camera.h
Go to the documentation of this file.
1 // Camera.h
2 #pragma once
3 
4 #include "component.h"
5 #include "vec2.h"
6 
14 class Camera : public Component {
15 public:
19  Camera();
20 
24  ~Camera();
25 
29  void update();
30 
36 
42  void setWorldPosition(float x, float y);
43 
44 private:
46 };
Manages the camera's view in a game, handling its position in the world space.
Definition: camera.h:14
Camera()
Definition: camera.cpp:9
void update()
Definition: camera.cpp:17
Vec2 m_worldPosition
Stores the world position of the camera.
Definition: camera.h:45
Vec2 getWorldPosition()
Definition: camera.cpp:62
void setWorldPosition(float x, float y)
Definition: camera.cpp:66
~Camera()
Definition: camera.cpp:13
Base class for all game components, providing basic component functionalities.
Definition: component.h:25
Defines the Component base class for all components in the game engine.
A structure to represent 2D vectors.
Definition: vec2.h:16
Definition of Vec2 structure for 2D vector operations.