vengine
0.1.0
3D graphics engine made with Vulkan
Loading...
Searching...
No Matches
KeyboardController.hpp
Go to the documentation of this file.
1
///
2
/// @file Camera.hpp
3
/// @brief This file contains the KeyboardController class
4
/// @namespace ven
5
///
6
7
#pragma once
8
9
#include "
VEngine/Window.hpp
"
10
#include "
VEngine/Object.hpp
"
11
12
namespace
ven
{
13
14
class
KeyboardController
{
15
16
public
:
17
18
struct
KeyMappings
{
19
int
moveLeft
= GLFW_KEY_A;
20
int
moveRight
= GLFW_KEY_D;
21
int
moveForward
= GLFW_KEY_W;
22
int
moveBackward
= GLFW_KEY_S;
23
int
moveUp
= GLFW_KEY_SPACE;
24
int
moveDown
= GLFW_KEY_LEFT_SHIFT;
25
int
lookLeft
= GLFW_KEY_LEFT;
26
int
lookRight
= GLFW_KEY_RIGHT;
27
int
lookUp
= GLFW_KEY_UP;
28
int
lookDown
= GLFW_KEY_DOWN;
29
};
30
31
void
moveInPlaneXZ
(GLFWwindow* window,
float
dt,
Object
&
object
)
const
;
32
33
KeyMappings
m_keys
{};
34
float
m_moveSpeed
{3.F};
35
float
m_lookSpeed
{1.5F};
36
37
};
// class KeyboardController
38
39
}
// namespace ven
Object.hpp
This file contains the Object class.
Window.hpp
This file contains the Window class.
ven::KeyboardController
Definition
KeyboardController.hpp:14
ven::KeyboardController::m_moveSpeed
float m_moveSpeed
Definition
KeyboardController.hpp:34
ven::KeyboardController::moveInPlaneXZ
void moveInPlaneXZ(GLFWwindow *window, float dt, Object &object) const
Definition
keyboardController.cpp:5
ven::KeyboardController::m_keys
KeyMappings m_keys
Definition
KeyboardController.hpp:33
ven::KeyboardController::m_lookSpeed
float m_lookSpeed
Definition
KeyboardController.hpp:35
ven::Object
Definition
Object.hpp:33
ven
ven::KeyboardController::KeyMappings
Definition
KeyboardController.hpp:18
ven::KeyboardController::KeyMappings::moveUp
int moveUp
Definition
KeyboardController.hpp:23
ven::KeyboardController::KeyMappings::lookUp
int lookUp
Definition
KeyboardController.hpp:27
ven::KeyboardController::KeyMappings::moveLeft
int moveLeft
Definition
KeyboardController.hpp:19
ven::KeyboardController::KeyMappings::lookLeft
int lookLeft
Definition
KeyboardController.hpp:25
ven::KeyboardController::KeyMappings::lookDown
int lookDown
Definition
KeyboardController.hpp:28
ven::KeyboardController::KeyMappings::moveRight
int moveRight
Definition
KeyboardController.hpp:20
ven::KeyboardController::KeyMappings::moveDown
int moveDown
Definition
KeyboardController.hpp:24
ven::KeyboardController::KeyMappings::lookRight
int lookRight
Definition
KeyboardController.hpp:26
ven::KeyboardController::KeyMappings::moveForward
int moveForward
Definition
KeyboardController.hpp:21
ven::KeyboardController::KeyMappings::moveBackward
int moveBackward
Definition
KeyboardController.hpp:22
include
VEngine
KeyboardController.hpp
Generated by
1.11.0