camera_controller.h 959 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #pragma once
  2. namespace Engine::Core {
  3. class World;
  4. }
  5. namespace Render::GL {
  6. class Camera;
  7. }
  8. namespace Game::Systems {
  9. class CameraService;
  10. struct LevelSnapshot;
  11. } // namespace Game::Systems
  12. class CameraController {
  13. public:
  14. CameraController(Render::GL::Camera *camera,
  15. Game::Systems::CameraService *camera_service,
  16. Engine::Core::World *world);
  17. void move(float dx, float dz);
  18. void elevate(float dy);
  19. void reset(int local_owner_id, const Game::Systems::LevelSnapshot &level);
  20. void zoom(float delta);
  21. [[nodiscard]] float distance() const;
  22. void yaw(float degrees);
  23. void orbit(float yaw_deg, float pitch_deg);
  24. void orbit_direction(int direction, bool shift);
  25. void follow_selection(bool enable);
  26. void set_follow_lerp(float alpha);
  27. void update_follow(bool follow_enabled);
  28. private:
  29. Render::GL::Camera *m_camera;
  30. Game::Systems::CameraService *m_camera_service;
  31. Engine::Core::World *m_world;
  32. };