Fireworks Engine  v2.0
Lightweight Sandbox Game Engine using OpenGL for additional Customisation and Quick Prototyping
freeflycamera.h
Go to the documentation of this file.
1 #pragma once
2 #include "perspectivecamera.h"
3 #include "Window.h"
4 
5 namespace fireworks { namespace graphics {
6 
8  enum class FFCamDirection
9  {
10  FORWARD,
11  BACKWARD,
12  LEFT,
13  RIGHT,
14  UP,
15  DOWN,
16  YAW_LEFT,
17  YAW_RIGHT
18  };
19 
22  {
23  public:
28  private:
29  bool firstMouse = true;
30  float lastX = 400;
31  float lastY = 300;
32  double xpos;
33  double ypos;
34  public:
40  FreeFlyCamera(glm::vec3 position, float flySpeed = 30.0f, float lookSensitivity = 0.25f);
41 
42  void update(Window* window, float deltaTime);
43  private:
44  void processKeyboardMovement(FFCamDirection direction, float deltaTime);
45  void processMouseMovement(float Xoffset, float Yoffset, bool constrainPitch = true);
46  };
47 
48 } }
49 
float MovementSpeed
The movement speed of the camera.
Definition: freeflycamera.h:25
FFCamDirection
The direction of the free fly camera.
Definition: freeflycamera.h:8
Definition: Window.h:79
Definition: Window.h:82
Definition: Window.h:80
float MouseSensitivity
The look speed of the camera.
Definition: freeflycamera.h:27
Definition: audioclip.cpp:3
Definition: Window.h:81
The class responsible for Window Creation.
Definition: Window.h:168
A free flying 3D camera.
Definition: freeflycamera.h:21
A perspective camera to view objects in perspective projection.
Definition: perspectivecamera.h:16