All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TouchPinchGesture.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "IEmscriptenInputHandler.h"
6 #include "InputEvents.h"
7 
8 namespace Eegeo
9 {
10  namespace Emscripten
11  {
12  namespace Input
13  {
15  {
16  private:
17  IEmscriptenInputHandler* m_pHandler;
18  bool m_pinching;
19  float m_previousDistance;
20  float m_majorScreenDimension;
21 
22  bool UpdatePinching(bool pinching, const TouchInputEvent& event, float& pinchScale, int numTouches, bool pointerUp);
23 
24  public:
25  TouchPinchGesture(IEmscriptenInputHandler* pHandler, const float screenWidth, const float screenHeight);
26 
27  void PointerDown(const TouchInputEvent& event);
28  void PointerUp(const TouchInputEvent& event);
29  void PointerMove(const TouchInputEvent& event);
30 
31  void NotifyScreenPropertiesChanged(int screenWidth, int screenHeight);
32  };
33  }
34  }
35 }