Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
PlatformInput.h
Go to the documentation of this file.
1#pragma once
2
5
6#include <Utility/INoCopyAndMove.h>
7#include <Common/primitive_type.h>
8#include <Math/TVector2.h>
9
10namespace ph::editor
11{
12
17class PlatformInput : private INoCopyAndMove
18{
19 friend class Platform;
20
21protected:
23 virtual ~PlatformInput();
24
25public:
29 virtual void poll(float64 deltaS) = 0;
30
37 virtual void virtualizeCursor() const = 0;
38 virtual void unvirtualizeCursor() const = 0;
40
46 virtual bool isKeyDown(EKeyCode keyCode) const = 0;
47 virtual bool isMouseButtonDown(EMouseCode mouseCode) const = 0;
49
55 virtual bool isKeyUp(EKeyCode keyCode) const = 0;
56 virtual bool isMouseButtonUp(EMouseCode mouseCode) const = 0;
58
65 virtual bool isKeyHold(EKeyCode keyCode) const = 0;
66 virtual bool isMouseButtonHold(EMouseCode mouseCode) const = 0;
68
74 virtual math::Vector2D getCursorPositionPx() const = 0;
75
80 virtual math::Vector2D getCursorMovementDeltaPx() const = 0;
81};
82
83}// end namespace ph::editor
Platform abstraction. An abstraction layer for the underlying hardware the application is running on....
Definition Platform.h:27
Platform input abstraction.
Definition PlatformInput.h:18
virtual bool isKeyUp(EKeyCode keyCode) const =0
virtual bool isKeyHold(EKeyCode keyCode) const =0
virtual bool isKeyDown(EKeyCode keyCode) const =0
virtual void virtualizeCursor() const =0
virtual math::Vector2D getCursorMovementDeltaPx() const =0
virtual math::Vector2D getCursorPositionPx() const =0
virtual bool isMouseButtonHold(EMouseCode mouseCode) const =0
virtual void poll(float64 deltaS)=0
virtual bool isMouseButtonUp(EMouseCode mouseCode) const =0
virtual void unvirtualizeCursor() const =0
virtual bool isMouseButtonDown(EMouseCode mouseCode) const =0
Definition ph_editor.h:10
EMouseCode
Definition EMouseCode.h:9
EKeyCode
Definition EKeyCode.h:9