载入中...
搜索中...
未找到
Touch.h
浏览该文件的文档.
1#pragma once
2
3#include "touch/Touch.h"
4
5
6namespace eve::touch::sdl
7{
8
11{
12public:
14 Touch();
16 ~Touch() override;
17
19 const std::vector<TouchInfo> &getTouches() const override;
21 const TouchInfo &getTouch(int64_t id) const override;
22
24 void onEvent(uint32_t eventtype, const TouchInfo &info);
25
26private:
27
28 // All current touches.
29 std::vector<TouchInfo> touches;
30
31}; // Touch
32
33} // eve::touch::sdl
Active touch-point query interface (positions in window pixels).
Definition Touch.h:15
SDL touch backend; touch state is updated from the event pump.
Definition Touch.h:11
void onEvent(uint32_t eventtype, const TouchInfo &info)
Updates touch state from an SDL event conversion (event module).
Definition Touch.cpp:30
Touch()
Binds this backend into the SDL event sink.
Definition Touch.cpp:16
~Touch() override
Releases active touch tracking and clears the event-sink owner.
Definition Touch.cpp:18
const std::vector< TouchInfo > & getTouches() const override
Gets all currently active touches.
Definition Touch.cpp:20
const TouchInfo & getTouch(int64_t id) const override
Gets a specific touch, using its ID.
Definition Touch.cpp:22
One active contact; id is unique only for the duration of the press.
Definition Touch.h:20
glm::uvec4 info