X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fui%2FPlayerController.hpp;h=69a15e9846ef7e7b42bd72f9b281682184eb015a;hb=1a8974bcfeb6f6c937f2ec523e52fdc4a3785f1e;hp=b9d3b2bd6cf6854f53cf5586b07fa49dcc72cc12;hpb=33b37e7242e4cbfa76e4a0d6e5bb54223b541162;p=blank.git diff --git a/src/ui/PlayerController.hpp b/src/ui/PlayerController.hpp index b9d3b2b..69a15e9 100644 --- a/src/ui/PlayerController.hpp +++ b/src/ui/PlayerController.hpp @@ -1,9 +1,9 @@ #ifndef BLANK_UI_PLAYERCONTROLLER_HPP_ #define BLANK_UI_PLAYERCONTROLLER_HPP_ -#include - +#include "../graphics/glm.hpp" #include "../world/EntityCollision.hpp" +#include "../world/EntityController.hpp" #include "../world/WorldCollision.hpp" @@ -12,10 +12,12 @@ namespace blank { class Player; class World; -class PlayerController { +class PlayerController +: public EntityController { public: PlayerController(World &, Player &); + ~PlayerController(); World &GetWorld() noexcept { return world; } const World &GetWorld() const noexcept { return world; } @@ -31,6 +33,7 @@ public: /// the magnitude (clamped to [0..1]) can be used to attenuate target velocity void SetMovement(const glm::vec3 &) noexcept; const glm::vec3 &GetMovement() const noexcept { return move_dir; } + /// turn the controlled entity's head by given pitch and yaw deltas void TurnHead(float pitch, float yaw) noexcept;