My Project
TouchGesturePinch.h
1 #pragma once
2 #include "TouchGestureBase.h"
3 
4 namespace ParaEngine
5 {
9  {
10  public:
12  virtual ~CTouchGesturePinch();
13 
14  enum PinchMode
15  {
16  PinchMode_Nil = 0,
17  PinchMode_Open,
18  PinchMode_Closed,
19  };
20 
21  typedef std::function<bool(CTouchGesturePinch& pinch_gesture)> GestureRecognized_callback;
22  public:
23  int GetPinchThreshold() const { return m_nPinchThreshold; }
24  void SetPinchThreshold(int val) { m_nPinchThreshold = val; }
25 
26  bool IsActive() const { return m_isActive; }
27  PinchMode Pinch_mode() const { return m_pinch_mode; }
28 
29  void ResetLastDistance();
30 
31  int GetDeltaDistance();
32 
33  virtual bool InterpreteTouchGesture(const TouchEvent* touch, TouchSessions* touch_sessions = NULL);
34  public:
35  int m_nPinchThreshold;
36  PinchMode m_pinch_mode;
37  int m_lastDistance;
38  int m_distance;
39  bool m_isActive;
40 
42  GestureRecognized_callback handleGestureRecognized;
43  };
44 }
45 
46 
47 
Touch gesture recognizer.
Definition: TouchGesturePinch.h:8
Definition: TouchGestureBase.h:8
GestureRecognized_callback handleGestureRecognized
return true if handled
Definition: TouchGesturePinch.h:42
different physics engine has different winding order.
Definition: EventBinding.h:32
touch event
Definition: EventClasses.h:118
manages all global touch sessions.
Definition: TouchSessions.h:11