vengine  0.0.1
3D graphics engine
Loading...
Searching...
No Matches
ven::EventManager Class Reference

Class for event manager. More...

#include <EventManager.hpp>

+ Collaboration diagram for ven::EventManager:

Public Member Functions

 EventManager ()=default
 
 ~EventManager ()=default
 
 EventManager (const EventManager &)=delete
 
EventManageroperator= (const EventManager &)=delete
 
 EventManager (EventManager &&)=delete
 
EventManageroperator= (EventManager &&)=delete
 
void handleEvents (GLFWwindow *window, ENGINE_STATE *engineState, Camera &camera, Gui &gui, float dt) const
 

Static Private Member Functions

static void moveCamera (GLFWwindow *window, Camera &camera, float dt)
 
static void updateEngineState (ENGINE_STATE *engineState, const ENGINE_STATE newState)
 
static bool isKeyJustPressed (GLFWwindow *window, long unsigned int key, std::array< bool, GLFW_KEY_LAST > &keyStates)
 
template<typename Iterator >
static void processKeyActions (GLFWwindow *window, Iterator begin, Iterator end)
 

Private Attributes

std::array< bool, GLFW_KEY_LAST > m_keyState {}
 

Detailed Description

Class for event manager.

Definition at line 42 of file EventManager.hpp.

Constructor & Destructor Documentation

◆ EventManager() [1/3]

ven::EventManager::EventManager ( )
default

◆ ~EventManager()

ven::EventManager::~EventManager ( )
default

◆ EventManager() [2/3]

ven::EventManager::EventManager ( const EventManager & )
delete

◆ EventManager() [3/3]

ven::EventManager::EventManager ( EventManager && )
delete

Member Function Documentation

◆ handleEvents()

void ven::EventManager::handleEvents ( GLFWwindow * window,
ENGINE_STATE * engineState,
Camera & camera,
Gui & gui,
float dt ) const

◆ isKeyJustPressed()

bool ven::EventManager::isKeyJustPressed ( GLFWwindow * window,
long unsigned int key,
std::array< bool, GLFW_KEY_LAST > & keyStates )
staticprivate

Definition at line 6 of file eventManager.cpp.

◆ moveCamera()

◆ operator=() [1/2]

EventManager & ven::EventManager::operator= ( const EventManager & )
delete

◆ operator=() [2/2]

EventManager & ven::EventManager::operator= ( EventManager && )
delete

◆ processKeyActions()

template<typename Iterator >
void ven::EventManager::processKeyActions ( GLFWwindow * window,
Iterator begin,
Iterator end )
staticprivate

Definition at line 17 of file eventManager.cpp.

◆ updateEngineState()

static void ven::EventManager::updateEngineState ( ENGINE_STATE * engineState,
const ENGINE_STATE newState )
inlinestaticprivate

Definition at line 59 of file EventManager.hpp.

Member Data Documentation

◆ m_keyState

std::array<bool, GLFW_KEY_LAST> ven::EventManager::m_keyState {}
mutableprivate

Definition at line 65 of file EventManager.hpp.


The documentation for this class was generated from the following files: