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