My Project
TouchEventSession.h
1 #pragma once
2 #include "EventClasses.h"
3 
4 namespace ParaEngine
5 {
8  {
9  public:
10  TouchEventSession(const TouchEvent& startEvent);
11 
12  TouchEvent& GetStartEvent();
13  TouchEvent& GetPrevEvent();
14  TouchEvent& GetCurrentEvent();
15  void SetStartEvent(const TouchEvent& event);
16  void SetCurrentEvent(const TouchEvent& event);
17  bool IsExpired(int nCurTime, int nExpireTicks);
18  Vector2 GetOffsetFromStartLocation();
19  Vector2 GetOffsetFromPrevLocation();
20  float GetMaxDragDistance();
21  bool IsTouchClick();
22  bool IsRightClick();
23  bool IsEnd();
24  int GetTouchId();
26  int32 GetDuration();
27 
28  int32 GetTag() const;
29  void SetTag(int32 val);
30  static int32 GetFingerSize();
31  static int32 GetTouchDistanceBetween(TouchEvent* touch1, TouchEvent* touch2);
32  public:
33  TouchEvent m_start_event;
34  TouchEvent m_previous_event;
35  TouchEvent m_current_event;
36  float m_max_delta;
37  int32 m_tag;
38  };
39 }
different physics engine has different winding order.
Definition: EventBinding.h:32
int32 GetDuration()
time in ms, from the start touch event to current time.
Definition: TouchEventSession.cpp:116
it tracks touch events with same id, and expires when a touch is too long.
Definition: TouchEventSession.h:7
Standard 2-dimensional vector.
Definition: ParaVector2.h:16
touch event
Definition: EventClasses.h:118