21 #ifndef HX3D_WINDOW_EVENT_MANAGER 22 #define HX3D_WINDOW_EVENT_MANAGER 24 #include <glm/vec2.hpp> 26 #include "hx3d/utils/log.hpp" 27 #include "hx3d/utils/ptr.hpp" 29 #include "hx3d/window/events.hpp" 48 virtual void poll() = 0;
float _touchPressure
Touch pressure.
glm::vec2 getTouchPosition()
Get the current touch position.
bool * _keysReleased
Keys released.
bool isScreenJustTouched()
Test if the screen have been just touched.
glm::vec2 _mouseMovement
Mouse movement.
bool * _mouseButtonReleased
Mouse buttons released.
bool _touchSimulation
Is touch simulated with mouse ?
glm::vec2 getTouchMovement()
Get the current touch movement.
bool isScreenReleased()
Test if the screen have been released.
glm::vec2 getScreenConvertedTouchPosition()
Get the screen converted touch position.
bool isMouseButtonJustClicked(MouseButtonEvent::Button button)
Test if a mouse button have just been clicked.
bool isKeyPressed(KeyEvent::Key key)
Test if the key have been pressed.
bool isScreenJustReleased()
Test if the screen have been just released.
glm::vec2 getMouseMovement()
Get the current mouse movement.
glm::vec2 _mousePosition
Mouse position.
InputHandler * _currentHandler
Current input handler.
glm::vec2 getMouseWheelMovement()
Get the current mouse wheel movement.
bool * _mouseButtonClicked
Mouse buttons clicked.
bool isMouseButtonReleased(MouseButtonEvent::Button button)
Test if a mouse button have been relased.
bool isKeyJustReleased(KeyEvent::Key key)
Test if the key have just been released.
glm::vec2 getMousePosition()
Get the current mouse position.
bool isScreenTouched()
Test if the screen have been touched.
virtual void poll()=0
Poll the event queue.
bool * _keysPressed
Keys pressed.
bool isKeyReleased(KeyEvent::Key key)
Test if the key have been released.
bool isMouseWheelTurned(MouseWheelEvent::Direction direction)
Test if the mouse wheel have been turned in a direction.
bool _screenTouched
Screen touched ?
bool isMouseButtonClicked(MouseButtonEvent::Button button)
Test if a mouse button have been clicked.
float getTouchPressure()
Get the current touch pressure.
void setInputHandler(InputHandler *handler)
Define an input handler.
Direction
Mouse wheel direction.
glm::vec2 _mouseWheelMovement
Mouse wheel movement.
bool * _mouseWheelTurned
Mouse wheels turned.
bool _screenReleased
Screen released ?
bool * _windowEvents
Window events.
bool isWindowState(WindowEvent::Type type)
Test the window state.
glm::vec2 _touchPosition
Touch position.
void emulateTouchWithMouse(bool value)
Emulate the touch system with the mouse.
bool isKeyJustPressed(KeyEvent::Key key)
Test if the key have just been pressed.
bool isMouseButtonJustReleased(MouseButtonEvent::Button button)
Test if a mouse button have just been released.
std::shared_ptr< T > Ptr
Quick-typing shared ptr.
glm::vec2 _touchMovement
Touch movement.