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
Public Member Functions | List of all members
engine::platform::PlatformEventObserver Class Reference

Platform events callback object. Extend this class and override the methods you want to be called by the PlatformController, then register an instance with PlatformController::register_observer. More...

#include <PlatformEventObserver.hpp>

Inheritance diagram for engine::platform::PlatformEventObserver:
Inheritance graph
[legend]

Public Member Functions

virtual void on_mouse_move (MousePosition position)
 Called by PlatformController for every frame in which the mouse moved.
 
virtual void on_key (Key key)
 Called by PlatformController for every frame in an event occured on the keyboard or mouse key.
 
virtual void on_window_resize (int width, int height)
 Called by PlatformController when the window is resized.
 
virtual ~PlatformEventObserver ()=default
 

Detailed Description

Platform events callback object. Extend this class and override the methods you want to be called by the PlatformController, then register an instance with PlatformController::register_observer.

Constructor & Destructor Documentation

◆ ~PlatformEventObserver()

virtual engine::platform::PlatformEventObserver::~PlatformEventObserver ( )
virtualdefault

Member Function Documentation

◆ on_mouse_move()

void engine::platform::PlatformEventObserver::on_mouse_move ( MousePosition  position)
virtual

Called by PlatformController for every frame in which the mouse moved.

Reimplemented in engine::test::app::MainPlatformEventObserver.

◆ on_key()

void engine::platform::PlatformEventObserver::on_key ( Key  key)
virtual

Called by PlatformController for every frame in an event occured on the keyboard or mouse key.

Reimplemented in engine::test::app::MainPlatformEventObserver.

◆ on_window_resize()

void engine::platform::PlatformEventObserver::on_window_resize ( int  width,
int  height 
)
virtual

Called by PlatformController when the window is resized.

Reimplemented in engine::graphics::GraphicsPlatformEventObserver.


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