X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcontroller.hpp;h=f674e23df9a0a9375c14bc56838acf8279881594;hb=e53a0e2e711a7d8bd9b0ddacd1360aa14370643f;hp=7dd3d110181120b4f60ab5e4015d243dbc8a186a;hpb=46509f82dcea114b004c53a7f3a9608f2518077f;p=blank.git diff --git a/src/controller.hpp b/src/controller.hpp index 7dd3d11..f674e23 100644 --- a/src/controller.hpp +++ b/src/controller.hpp @@ -12,22 +12,22 @@ namespace blank { class FPSController { public: - explicit FPSController(Entity &); + explicit FPSController(Entity &) noexcept; - Ray Aim() const { return entity.Aim(entity.ChunkCoords()); } + Ray Aim() const noexcept { return entity.Aim(entity.ChunkCoords()); } - const glm::vec3 &Velocity() const { return velocity; } - void Velocity(const glm::vec3 &vel) { velocity = vel; } + const glm::vec3 &Velocity() const noexcept { return velocity; } + void Velocity(const glm::vec3 &vel) noexcept { velocity = vel; } // all angles in radians (full circle = 2π) - float Pitch() const { return pitch; } - void Pitch(float p); - void RotatePitch(float delta); - float Yaw() const { return yaw; } - void Yaw(float y); - void RotateYaw(float delta); + float Pitch() const noexcept { return pitch; } + void Pitch(float p) noexcept; + void RotatePitch(float delta) noexcept; + float Yaw() const noexcept { return yaw; } + void Yaw(float y) noexcept; + void RotateYaw(float delta) noexcept; - void Update(int dt); + void Update(int dt) noexcept; private: Entity &entity; @@ -43,9 +43,9 @@ private: class RandomWalk { public: - explicit RandomWalk(Entity &); + explicit RandomWalk(Entity &) noexcept; - void Update(int dt); + void Update(int dt) noexcept; private: Entity &entity;