class GestureDetector: public Device
{
private:
+ enum
+ {
+ MAX_POINTS = 3
+ };
+
struct TouchPoint
{
bool down;
float down_y;
float x;
float y;
+ bool threshold_exceeded;
TouchPoint();
};
Touchscreen &touchscreen;
- TouchPoint points[3];
+ TouchPoint points[MAX_POINTS];
Gesture current_gesture;
unsigned active_points;
bool invalid_gesture;
void touch_move(unsigned, float, float);
void start_gesture();
void update_progress();
+ void end_gesture();
void window_resized(unsigned, unsigned);
};