1 #ifndef BLANK_CONTROLLER_HPP_
2 #define BLANK_CONTROLLER_HPP_
4 #include "geometry.hpp"
17 const glm::mat4 &Transform() const;
20 void Velocity(glm::vec3 vel) { velocity = vel; dirty = true; }
21 void OrientationVelocity(const glm::vec3 &vel);
22 void Position(glm::vec3 pos) { position = pos; dirty = true; }
23 void Move(glm::vec3 delta) { Position(position + delta); }
25 // all angles in radians (full circle = 2π)
26 float Pitch() const { return pitch; }
28 void RotatePitch(float delta);
29 float Yaw() const { return yaw; }
31 void RotateYaw(float delta);
33 void HandleKeyboard(const SDL_KeyboardEvent &);
34 void HandleMouse(const SDL_MouseMotionEvent &);
44 mutable glm::mat4 transform;
48 float pitch_sensitivity;
49 float yaw_sensitivity;
51 bool front, back, left, right, up, down;