X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcontroller.hpp;fp=src%2Fcontroller.hpp;h=0000000000000000000000000000000000000000;hb=b7d09e1e35ef90282c97509e0020b20db3c7ea9f;hp=f674e23df9a0a9375c14bc56838acf8279881594;hpb=e53a0e2e711a7d8bd9b0ddacd1360aa14370643f;p=blank.git diff --git a/src/controller.hpp b/src/controller.hpp deleted file mode 100644 index f674e23..0000000 --- a/src/controller.hpp +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef BLANK_CONTROLLER_HPP_ -#define BLANK_CONTROLLER_HPP_ - -#include "entity.hpp" -#include "geometry.hpp" - -#include - - -namespace blank { - -class FPSController { - -public: - explicit FPSController(Entity &) noexcept; - - Ray Aim() const noexcept { return entity.Aim(entity.ChunkCoords()); } - - 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 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) noexcept; - -private: - Entity &entity; - - glm::vec3 velocity; - - float pitch; - float yaw; - -}; - - -class RandomWalk { - -public: - explicit RandomWalk(Entity &) noexcept; - - void Update(int dt) noexcept; - -private: - Entity &entity; - - int time_left; - -}; - -} - -#endif