4 #ifndef GESTUREDETECTOR_H_ 5 #define GESTUREDETECTOR_H_ 9 #include <android/sensor.h> 10 #include <android/log.h> 12 #include <android/native_window_jni.h> 13 #include <android/configuration.h> 14 #include <android/input.h> 15 #include <android/keycodes.h> 56 virtual GESTURE_STATE
Detect(
const AInputEvent* motion_event) = 0;
73 virtual GESTURE_STATE
Detect(
const AInputEvent* motion_event);
84 int64_t last_tap_time_{0};
85 float last_tap_x_{0.0f};
86 float last_tap_y_{0.0f};
91 virtual GESTURE_STATE
Detect(
const AInputEvent* motion_event);
104 int32_t FindIndex(
const AInputEvent* event, int32_t
id);
111 virtual GESTURE_STATE
Detect(
const AInputEvent* event);
112 bool GetPointers(lug::Math::Vec2f& v1, lug::Math::Vec2f& v2);
122 int32_t FindIndex(
const AInputEvent* event, int32_t
id);
129 virtual GESTURE_STATE
Detect(
const AInputEvent* event);
130 bool GetPointer(lug::Math::Vec2f& v);
virtual ~DoubletapDetector()
const int32_t TAP_TIMEOUT
const AInputEvent * event_
TapDetector tap_detector_
const int32_t DOUBLE_TAP_SLOP
const AInputEvent * event_
std::vector< int32_t > vec_pointers_
virtual ~GestureDetector()
virtual void SetConfiguration(AConfiguration *config)
virtual GESTURE_STATE Detect(const AInputEvent *motion_event)=0
const int32_t DOUBLE_TAP_TIMEOUT
std::vector< int32_t > vec_pointers_