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
PlatformEventObserver.hpp
Go to the documentation of this file.
1
6#ifndef PLATFORMEVENTOBSERVER_HPP
7#define PLATFORMEVENTOBSERVER_HPP
9
10namespace engine::platform {
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
Defines the Input class that serves as the interface handling user input via keyboard and mouse.
Represents the state of the key in a given frame.
Definition Input.hpp:154
Platform events callback object. Extend this class and override the methods you want to be called by ...
Definition PlatformEventObserver.hpp:17
virtual void on_mouse_move(MousePosition position)
Called by PlatformController for every frame in which the mouse moved.
Definition PlatformController.cpp:178
virtual void on_window_resize(int width, int height)
Called by PlatformController when the window is resized.
Definition PlatformController.cpp:184
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
Definition Input.hpp:10
Represents mouse position in a given frame relative to the top left corner of the screen.
Definition Input.hpp:237