X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fcontroller.hpp;h=c13a14ec5c8043fe5e1c6d92006bb33b327a2490;hb=c3c5045f06327db2a3c97eae77a072bc06677286;hp=aaa51f5da094069dbdb2551813fd7b9c3a26820d;hpb=119a7b6a7fdea2d501fc7b3410ffb22f72e8a1b8;p=blank.git diff --git a/src/controller.hpp b/src/controller.hpp index aaa51f5..c13a14e 100644 --- a/src/controller.hpp +++ b/src/controller.hpp @@ -4,7 +4,6 @@ #include "entity.hpp" #include "geometry.hpp" -#include #include @@ -17,6 +16,9 @@ public: Ray Aim() const { return entity.Aim(entity.ChunkCoords()); } + const glm::vec3 &Velocity() const { return velocity; } + void Velocity(const glm::vec3 &vel) { velocity = vel; } + // all angles in radians (full circle = 2π) float Pitch() const { return pitch; } void Pitch(float p); @@ -25,23 +27,16 @@ public: void Yaw(float y); void RotateYaw(float delta); - void HandleKeyboard(const SDL_KeyboardEvent &); - void HandleMouse(const SDL_MouseMotionEvent &); - void Update(int dt); private: Entity &entity; + glm::vec3 velocity; + float pitch; float yaw; - float move_velocity; - float pitch_sensitivity; - float yaw_sensitivity; - - bool front, back, left, right, up, down; - }; }