#include <camera.hpp>
Definition at line 6 of file camera.hpp.
◆ Camera()
◆ ~Camera()
◆ DrawSceneProj()
| void Camera::DrawSceneProj |
( |
| ) |
|
Set the projection matrix for RENDERER to draw the scene framebuffer
Definition at line 68 of file camera.cpp.
◆ GetPosition()
| Vec2 Camera::GetPosition |
( |
| ) |
const |
|
inline |
Get the camera position.
- Returns
- the camera position
Definition at line 75 of file camera.hpp.
◆ GetProjMatrix()
| glm::mat4 Camera::GetProjMatrix |
( |
| ) |
const |
|
inline |
◆ GetRotation()
| float Camera::GetRotation |
( |
| ) |
const |
|
inline |
Get the camera rotation angle.
- Returns
- the camera rotation angle
Definition at line 87 of file camera.hpp.
◆ GetViewMatrix()
| glm::mat4 Camera::GetViewMatrix |
( |
| ) |
const |
|
inline |
◆ GetViewProjMatrix()
| glm::mat4 Camera::GetViewProjMatrix |
( |
| ) |
const |
|
inline |
◆ GetZoom()
| float Camera::GetZoom |
( |
| ) |
const |
|
inline |
Get the zoom level.
- Returns
- the zoom level
Definition at line 81 of file camera.hpp.
◆ InitializeProj()
| void Camera::InitializeProj |
( |
| ) |
|
Initialize RENDERER and TEXT_RENDERER projection matrices
Definition at line 11 of file camera.cpp.
◆ Move()
| void Camera::Move |
( |
float | x_offset, |
|
|
float | y_offset ) |
Move the camera position. The function expects coordinates in engine units (screen width = 10 units).
- Parameters
-
| x_offset | the x offset |
| y_offset | the y offset |
Definition at line 89 of file camera.cpp.
◆ ResetSceneProj()
| void Camera::ResetSceneProj |
( |
| ) |
|
Set the projection matrix for RENDERER. It's the one generated by InitializeProj
Definition at line 75 of file camera.cpp.
◆ Rotate()
| void Camera::Rotate |
( |
float | rotation_offset | ) |
|
Rotate the camera.
- Parameters
-
| rotation_offset | Angle offset in degrees |
Definition at line 126 of file camera.cpp.
◆ SetPosition()
| void Camera::SetPosition |
( |
Vec2 | pos | ) |
|
Set the camera position. The function expects coordinates in engine units (screen width = 10 units).
- Parameters
-
Definition at line 82 of file camera.cpp.
◆ SetRotation()
| void Camera::SetRotation |
( |
float | rotation | ) |
|
Set the camera rotation angle.
- Parameters
-
Definition at line 119 of file camera.cpp.
◆ SetZoom()
| void Camera::SetZoom |
( |
float | zoom | ) |
|
Set the zoom level. Currently the zoom level is clamped between 0.1 and 3.0.
- Parameters
-
Definition at line 97 of file camera.cpp.
◆ Zoom()
| void Camera::Zoom |
( |
float | zoom_offset | ) |
|
Change the zoom level. Currently the zoom level is clamped between 0.1 and 3.0.
- Parameters
-
| zoom_offset | the zoom offset |
Definition at line 108 of file camera.cpp.
The documentation for this class was generated from the following files: