All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TouchScreenPanGesture.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "AppInterface.h"
6 #include "VectorMath.h"
7 #include "WindowsInput.h"
8 #include <vector>
9 
10 namespace Eegeo
11 {
12  namespace Windows
13  {
14  namespace Input
15  {
17  {
18  private:
19  IWindowsInputHandler* m_pHandler;
20  bool m_panning;
21  std::vector<Eegeo::v2> m_inputs;
22  Eegeo::v2 m_panCenter;
23  Eegeo::v2 m_panAnchor;
24  const float m_majorScreenDimension;
25  int m_maxDeviceTouchCount;
26 
27  Eegeo::v2 GetTouchExtents(const TouchScreenInputEvent& event, const std::vector<TouchScreenInputEvent>& touchInputEvents) const;
28  void PopulatePanData(int numTouches, const v2& touchExtents, AppInterface::PanData& out_panData) const;
29 
30  public:
31  TouchScreenPanGesture(IWindowsInputHandler* m_pHandler, const float screenWidth, const float screenHeight, const int maxDeviceTouchCount);
32 
33  void PointerDown(const TouchScreenInputEvent& event, const std::vector<TouchScreenInputEvent>& touchInputEvents);
34  void PointerUp(const TouchScreenInputEvent& event, const std::vector<TouchScreenInputEvent>& touchInputEvents);
35  void PointerMove(const TouchScreenInputEvent& event, const std::vector<TouchScreenInputEvent>& touchInputEvents);
36  };
37  }
38  }
39 }