All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RotateGesture.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "VectorMath.h"
6 #include "AndroidInput.h"
7 
8 namespace Eegeo
9 {
10  namespace Android
11  {
12  namespace Input
13  {
15  {
16  private:
17  IAndroidInputHandler* pHandler;
18  bool rotating;
19  Eegeo::v2 lastPointer[2];
20  float lastRotationRadians;
21  float m_totalRotation;
22  float m_previousRotationDelta;
23 
24  bool needNewBaseline;
25 
26  Eegeo::v2 m_baselineDirection;
27 
28  float m_majorScreenDimension;
29 
30  bool UpdateRotation(const TouchInputEvent& event, int numTouches, bool pointerUp);
31 
32  public:
33  RotateGesture(IAndroidInputHandler* pHandler, float screenWidth, float screenHeight);
34 
35  void PointerDown(const TouchInputEvent& event);
36  void PointerUp(const TouchInputEvent& event);
37  void PointerMove(const TouchInputEvent& event);
38 
39  void SetScreenDimensions(float screenWidth, float screenHeight);
40  };
41  }
42  }
43 }