]> git.localhorst.tv Git - blank.git/blobdiff - src/app/FPSController.cpp
lil cleanup of common and unused stuff
[blank.git] / src / app / FPSController.cpp
diff --git a/src/app/FPSController.cpp b/src/app/FPSController.cpp
deleted file mode 100644 (file)
index 87591aa..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#include "FPSController.hpp"
-
-#include <glm/gtx/euler_angles.hpp>
-#include <glm/gtx/rotate_vector.hpp>
-
-
-namespace blank {
-
-FPSController::FPSController(Entity &entity) noexcept
-: entity(entity)
-, pitch(0)
-, yaw(0) {
-       entity.Ref();
-}
-
-FPSController::~FPSController() {
-       entity.UnRef();
-}
-
-
-void FPSController::Pitch(float p) noexcept {
-       pitch = p;
-       if (pitch > PI / 2) {
-               pitch = PI / 2;
-       } else if (pitch < -PI / 2) {
-               pitch = -PI / 2;
-       }
-}
-
-void FPSController::RotatePitch(float delta) noexcept {
-       Pitch(pitch + delta);
-}
-
-void FPSController::Yaw(float y) noexcept {
-       yaw = y;
-       if (yaw > PI) {
-               yaw -= PI * 2;
-       } else if (yaw < -PI) {
-               yaw += PI * 2;
-       }
-}
-
-void FPSController::RotateYaw(float delta) noexcept {
-       Yaw(yaw + delta);
-}
-
-
-void FPSController::Update(int dt) noexcept {
-       entity.Orientation(glm::quat(glm::vec3(pitch, yaw, 0.0f)));
-       entity.Velocity(glm::rotateY(velocity, yaw));
-}
-
-}