matf-rg-engine
1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
Loading...
Searching...
No Matches
engine
include
engine
platform
PlatformEventObserver.hpp
Go to the documentation of this file.
1
6
#ifndef PLATFORMEVENTOBSERVER_HPP
7
#define PLATFORMEVENTOBSERVER_HPP
8
#include <
engine/platform/Input.hpp
>
9
10
namespace
engine::platform
{
17
class
PlatformEventObserver
{
18
public
:
22
virtual
void
on_mouse_move
(
MousePosition
position);
23
27
virtual
void
on_key
(
Key
key);
28
32
virtual
void
on_window_resize
(
int
width,
int
height);
33
34
virtual
~PlatformEventObserver
() =
default
;
35
};
36
}
37
#endif
//PLATFORMEVENTOBSERVER_HPP
Input.hpp
Defines the Input class that serves as the interface handling user input via keyboard and mouse.
engine::platform::Key
Represents the state of the key in a given frame.
Definition
Input.hpp:154
engine::platform::PlatformEventObserver
Platform events callback object. Extend this class and override the methods you want to be called by ...
Definition
PlatformEventObserver.hpp:17
engine::platform::PlatformEventObserver::on_mouse_move
virtual void on_mouse_move(MousePosition position)
Called by PlatformController for every frame in which the mouse moved.
Definition
PlatformController.cpp:178
engine::platform::PlatformEventObserver::on_window_resize
virtual void on_window_resize(int width, int height)
Called by PlatformController when the window is resized.
Definition
PlatformController.cpp:184
engine::platform::PlatformEventObserver::on_key
virtual void on_key(Key key)
Called by PlatformController for every frame in an event occured on the keyboard or mouse key.
Definition
PlatformController.cpp:181
engine::platform::PlatformEventObserver::~PlatformEventObserver
virtual ~PlatformEventObserver()=default
engine::platform
Definition
Input.hpp:10
engine::platform::MousePosition
Represents mouse position in a given frame relative to the top left corner of the screen.
Definition
Input.hpp:237
Generated by
1.9.8