All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TouchScreenRotateGesture.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "VectorMath.h"
6 #include "WindowsInput.h"
7 
8 
9 namespace Eegeo
10 {
11  namespace Windows
12  {
13  namespace Input
14  {
16  {
17  private:
18  IWindowsInputHandler* m_pHandler;
19 
20  bool m_rotating;
21 
22  float m_lastRotationRadians;
23  float m_totalRotation;
24  float m_previousRotationDelta;
25 
26  bool m_needNewBaseLine;
27 
28  v2 m_baseLineDirection;
29 
30  const float m_majorScreenDimension;
31  std::vector<TouchScreenInputEvent> m_lastPointer;
32 
33  bool UpdateRotation(const TouchScreenInputEvent& event, int numTouches, bool pointerUp, const std::vector<TouchScreenInputEvent>& touchScreenEvents);
34 
35  public:
36  TouchScreenRotateGesture(IWindowsInputHandler* pHandler, float screenWidth, float screenHeight, int maxDeviceTouchCount);
37 
38  void PointerDown(const TouchScreenInputEvent& event, const std::vector<TouchScreenInputEvent>& m_touchScreenEvents);
39  void PointerUp(const TouchScreenInputEvent& event, const std::vector<TouchScreenInputEvent>& m_touchScreenEvents);
40  void PointerMove(const TouchScreenInputEvent& event, const std::vector<TouchScreenInputEvent>& m_touchScreenEvents);
41  };
42  }
43  }
44 }