|
CoriEngine
|
A class that is used to manipulate Camera of the Scene. Each Scene has one of those. More...
#include <CameraController.hpp>
Public Member Functions | |
| ~CameraController ()=default | |
| void | CreateOrthoCamera (const float left, float right, const float bottom, const float top, const uint8_t depth=50) |
| Creates or recreate an orthographic camera. | |
| void | SetPosition (const glm::vec2 newPos) |
| Sets the position of the camera. | |
| void | SetRotation (const float angle) |
| Sets the rotational angle of the camera. | |
| void | SetScale (const glm::vec2 scale) |
| Changes camera scale to the requested value. | |
| glm::vec2 | GetPosition () const |
| Gets the current camera position. | |
| float | GetRotation () const |
| Gets the current camera rotation. | |
| glm::vec2 | GetScale () const |
| Gets the current camera scale. | |
| glm::vec2 | GetSize () const |
| Gets the current camera size. | |
| void | RecalculateVP () |
| Recalculates the view projection matrix. | |
A class that is used to manipulate Camera of the Scene. Each Scene has one of those.
Definition at line 14 of file CameraController.hpp.
|
default |
| void Cori::Graphics::CameraController::CreateOrthoCamera | ( | const float | left, |
| float | right, | ||
| const float | bottom, | ||
| const float | top, | ||
| const uint8_t | depth = 50 ) |
Creates or recreate an orthographic camera.
| left | Left camera border. |
| right | Right camera border. |
| bottom | Bottom camera border. |
| top | Top camera border. |
| depth | Depth of the camera. All object that have a depth higher that this value will not be rendered. |
Definition at line 8 of file CameraController.cpp.

| glm::vec2 Cori::Graphics::CameraController::GetPosition | ( | ) | const |
Gets the current camera position.
Definition at line 25 of file CameraController.cpp.
| float Cori::Graphics::CameraController::GetRotation | ( | ) | const |
Gets the current camera rotation.
Definition at line 29 of file CameraController.cpp.
| glm::vec2 Cori::Graphics::CameraController::GetScale | ( | ) | const |
Gets the current camera scale.
Definition at line 33 of file CameraController.cpp.
| glm::vec2 Cori::Graphics::CameraController::GetSize | ( | ) | const |
Gets the current camera size.
Definition at line 37 of file CameraController.cpp.
| void Cori::Graphics::CameraController::RecalculateVP | ( | ) |
Recalculates the view projection matrix.
It is necessarily to call after you've changes camera properties to apply then.
Definition at line 52 of file CameraController.cpp.

| void Cori::Graphics::CameraController::SetPosition | ( | const glm::vec2 | newPos | ) |
Sets the position of the camera.
| newPos | Position to set. |
Definition at line 21 of file CameraController.cpp.
| void Cori::Graphics::CameraController::SetRotation | ( | const float | angle | ) |
Sets the rotational angle of the camera.
| angle | Angle in degrees. |
Definition at line 42 of file CameraController.cpp.
| void Cori::Graphics::CameraController::SetScale | ( | const glm::vec2 | scale | ) |
Changes camera scale to the requested value.
| scale | Scale to apply. |
Definition at line 47 of file CameraController.cpp.