10 #include <glm/gtc/matrix_transform.hpp> 
   36         static constexpr 
float YAW         = -90.0f;
 
   37         static constexpr 
float PITCH       = 0.0f;
 
   38         static constexpr 
float SPEED       = 2.5f;
 
   40         static constexpr 
float ZOOM        = 45.0f;
 
   88         explicit Camera(glm::vec3 position = glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3 up = glm::vec3(0.0f, 1.0f, 0.0f),
 
   89                         float yaw          = 
YAW, 
float pitch                          = 
PITCH);
 
   94         Camera(
float posX, 
float posY, 
float posZ, 
float upX, 
float upY, 
float upZ, 
float yaw, 
float pitch);
 
  109         void rotate_camera(
float x_offset, 
float y_offset, 
bool constrainPitch = 
true);
 
  114         void zoom(
float offset);
 
Camera processes input and calculates the corresponding Euler Angles, Vectors and Matrices for use in...
Definition: Camera.hpp:17
 
glm::mat4 view_matrix() const
Definition: Camera.cpp:26
 
Camera(glm::vec3 position=glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3 up=glm::vec3(0.0f, 1.0f, 0.0f), float yaw=YAW, float pitch=PITCH)
constructor with vectors.
Definition: Camera.cpp:6
 
static constexpr float SENSITIVITY
Definition: Camera.hpp:39
 
void rotate_camera(float x_offset, float y_offset, bool constrainPitch=true)
Processes input received from a mouse input system. Expects the offset value in both the x and y dire...
Definition: Camera.cpp:48
 
float MovementSpeed
Used in Camera::move_camera. The higher the value the faster the camera will move on keyboard action.
Definition: Camera.hpp:73
 
glm::vec3 Position
Defines a position in World-Space of where the Camera is located.
Definition: Camera.hpp:45
 
float Zoom
Defines camera FOV.
Definition: Camera.hpp:83
 
static constexpr float SPEED
Definition: Camera.hpp:38
 
glm::vec3 Front
Defines a vector in which the camera is pointed relative to the Camera::Position.
Definition: Camera.hpp:50
 
void zoom(float offset)
Processes input received from a mouse scroll-wheel event. Only requires to be input on the vertical w...
Definition: Camera.cpp:69
 
static constexpr float YAW
Default camera values.
Definition: Camera.hpp:36
 
float Yaw
Definition: Camera.hpp:67
 
glm::vec3 Right
Defines the camera Right vector.
Definition: Camera.hpp:60
 
float Pitch
Definition: Camera.hpp:68
 
static constexpr float ZOOM
Definition: Camera.hpp:40
 
static constexpr float PITCH
Definition: Camera.hpp:37
 
void update_camera_vectors()
Calculates the front vector from the Camera's (updated) Euler Angles.
Definition: Camera.cpp:78
 
glm::vec3 WorldUp
Defines the up orientation of the World-Space.
Definition: Camera.hpp:65
 
glm::vec3 Up
Defines the Up vector in the World-Space.
Definition: Camera.hpp:55
 
float MouseSensitivity
Used in Camera::rotate_camera. The higher the value the faster the camera will move on mouse action.
Definition: Camera.hpp:78
 
Movement
Defines several possible options for camera movement. Used as abstraction to stay away from window-sy...
Definition: Camera.hpp:22
 
@ BACKWARD
Definition: Camera.hpp:25
 
@ RIGHT
Definition: Camera.hpp:27
 
@ UP
Definition: Camera.hpp:28
 
@ FORWARD
Definition: Camera.hpp:24
 
@ DOWN
Definition: Camera.hpp:29
 
@ LEFT
Definition: Camera.hpp:26
 
@ None
Definition: Camera.hpp:23
 
void move_camera(Movement direction, float deltaTime)
Processes input received from any keyboard-like input system. Accepts input parameter in the form of ...
Definition: Camera.cpp:31
 
Definition: Camera.hpp:12