kick
|
00001 // 00002 // Created by morten on 07/08/14. 00003 // 00004 00005 00006 #pragma once 00007 00008 #include <map> 00009 #include "glm/glm.hpp" 00010 00011 namespace kick { 00012 00013 struct Touch{ 00014 bool down; 00015 bool up; 00016 int64_t fingerId; 00017 glm::ivec2 pos; 00018 glm::ivec2 delta; 00019 float pressure; 00020 }; 00021 00022 class TouchInput { 00023 public: 00024 static void setTouchStarted(int64_t fingerid, glm::ivec2 pos, float pressure); 00025 static void setTouchMoved(int64_t fingerid, glm::ivec2 pos, float pressure); 00026 static void setTouchEnded(int64_t fingerid, glm::ivec2 pos); 00027 static void reset(); 00028 static std::map<int64_t,Touch>::const_iterator begin(); 00029 static std::map<int64_t,Touch>::const_iterator end(); 00030 private: 00031 TouchInput() = delete; 00032 static std::map<int64_t,Touch> touches; 00033 }; 00034 } 00035 00036 00037