00001 #ifndef TOUCHPOINT_H 00002 #define TOUCHPOINT_H 00003 00004 #include "Types.h" 00005 00006 using namespace std; 00007 00008 namespace RenderTools { 00009 00010 typedef unsigned long TouchIndex; 00011 00012 class TouchPoint { 00013 public: 00014 TouchPoint( const Vec2 & now = Vec2(), const Vec2 & before = Vec2(), unsigned int taps = 0, float timestamp = 0.0f, float holding = 0.0f ): 00015 m_now( now ), 00016 m_before( before ), 00017 m_taps( taps ), 00018 m_timestamp( timestamp ), 00019 m_holding( holding ){ 00020 } 00021 00022 const Vec2 & getPointNow( void ) const ; 00023 const Vec2 & getPointBefore( void ) const ; 00024 unsigned int getTaps( void ) const ; 00025 float getTimeStamp( void ) const ; 00026 float getHolding( void ) const ; 00027 00028 void setPointNow( const Vec2 & ); 00029 void setPointBefore( const Vec2 & ); 00030 void setTaps( unsigned int ); 00031 void setTimeStamp( float ); 00032 void setHolding( float ); 00033 00034 protected: 00035 00036 Vec2 m_now; 00037 Vec2 m_before; 00038 unsigned int m_taps; 00039 float m_interval; 00040 float m_timestamp; 00041 float m_holding; 00042 }; 00043 00044 };//namespace RenderTools 00045 00046 #endif
1.5.8