62 fmt::format(
"Camera entity is invalid: {}",
_cameraEntity.has_value() ?
"not alive" :
"not set"));
65 auto ®istry =
_core.GetRegistry();
86 auto ®istry =
_core.GetRegistry();
212 void SetBehavior(std::shared_ptr<CameraMovement::Utils::ICameraBehavior> behavior)
235 std::shared_ptr<CameraMovement::Utils::ICameraBehavior>
_behavior =
nullptr;
Definition CameraMovementError.hpp:24
bool _isMouseDragging
Definition CameraManager.hpp:231
double _lastMouseX
Definition CameraManager.hpp:229
Engine::Core & _core
Definition CameraManager.hpp:225
float GetMouseSensitivity() const
Get the mouse sensitivity of the camera.
Definition CameraManager.hpp:116
void SetMovementSpeed(float speed)
Set the movement speed of the camera.
Definition CameraManager.hpp:95
CameraManager(Engine::Core &core)
Definition CameraManager.hpp:26
std::shared_ptr< CameraMovement::Utils::ICameraBehavior > GetBehavior() const
Get the current camera behavior instance.
Definition CameraManager.hpp:222
void SetMouseSensitivity(float sensitivity)
Set the mouse sensitivity of the camera.
Definition CameraManager.hpp:109
glm::quat _originRotation
Definition CameraManager.hpp:233
bool IsMouseDragging() const
Check if the mouse is being dragged.
Definition CameraManager.hpp:156
void SetLastMousePosition(double x, double y)
Set the last mouse position.
Definition CameraManager.hpp:124
float GetMovementSpeed() const
Get the movement speed of the camera.
Definition CameraManager.hpp:102
const glm::quat & GetOriginRotation() const
Get the origin rotation.
Definition CameraManager.hpp:170
void SetActiveCamera(Engine::Entity entity)
Set the active camera entity.
Definition CameraManager.hpp:36
float _mouseSensitivity
Definition CameraManager.hpp:228
Engine::Core & GetCore()
Get the core reference.
Definition CameraManager.hpp:191
float _movementSpeed
Definition CameraManager.hpp:227
bool _wasCursorMasked
Definition CameraManager.hpp:232
double _lastMouseY
Definition CameraManager.hpp:230
void SetWasCursorMasked(bool masked)
Set whether the cursor was masked in the previous frame.
Definition CameraManager.hpp:177
int GetJoystickId() const
Get the joystick ID used for camera control.
Definition CameraManager.hpp:205
void SetBehavior(std::shared_ptr< CameraMovement::Utils::ICameraBehavior > behavior)
Set the camera behavior instance.
Definition CameraManager.hpp:212
std::optional< Engine::Entity > _cameraEntity
Definition CameraManager.hpp:226
int _joystickId
Definition CameraManager.hpp:234
double GetLastMouseX() const
Get the last mouse X position.
Definition CameraManager.hpp:135
void SetMouseDragging(bool dragging)
Set whether the mouse is being dragged.
Definition CameraManager.hpp:149
bool WasCursorMasked() const
Check if the cursor was masked in the previous frame.
Definition CameraManager.hpp:184
void SetOriginRotation(const glm::quat &rotation)
Set the origin rotation (used for mouse dragging).
Definition CameraManager.hpp:163
std::shared_ptr< CameraMovement::Utils::ICameraBehavior > _behavior
Definition CameraManager.hpp:235
Engine::Entity GetActiveCamera() const
Get the active camera entity.
Definition CameraManager.hpp:57
void SetJoystickId(int joystickId)
Set the joystick ID to use for camera control.
Definition CameraManager.hpp:198
double GetLastMouseY() const
Get the last mouse Y position.
Definition CameraManager.hpp:142
bool HasValidCamera() const
Check if the camera entity is set and valid.
Definition CameraManager.hpp:79
Base interface for camera behaviors.
Definition CameraBehavior.hpp:18
The core is the place where all the data of the engine is stored. It contains the registry (entities)...
Definition Core.hpp:33
Wrapper class providing a convenient interface for entity manipulation with the Core....
Definition Entity.hpp:20
bool IsAlive() const
Check if the entity is alive.
Definition Entity.cpp:3
bool HasComponents() const
Check if entity have one or multiple component's type.
Definition Entity.hpp:109
Definition CameraControlSystemManager.hpp:9
Definition CameraManager.hpp:12