glc_userinput.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024
00025 #ifndef GLC_USERINPUT_H_
00026 #define GLC_USERINPUT_H_
00027
00028 #include "../maths/glc_vector2d.h"
00029
00030 #include "../glc_config.h"
00031
00032 class GLC_LIB_EXPORT GLC_UserInput
00033 {
00034 public:
00035 GLC_UserInput(int x= 0, int y= 0);
00036 virtual ~GLC_UserInput();
00037
00038
00040
00042
00043 public:
00045 inline int x() const
00046 {return m_X;}
00047
00049 inline int y() const
00050 {return m_Y;}
00051
00053 inline double normalyzeXTouchCenter() const
00054 {return m_NormalyzeX;}
00055
00057 inline double normalyzeYTouchCenter() const
00058 {return m_NormalyzeX;}
00059
00061 inline GLC_Vector2d translation() const
00062 {return m_Translation;}
00063
00065 inline double rotationAngle() const
00066 {return m_Rotation;}
00067
00069 inline double scaleFactor() const
00070 {return m_ScaleFactor;}
00071
00073 inline bool transformationIsSet() const
00074 {return m_TransformationIsSet;}
00076
00078
00080
00081 public:
00083 void setPosition(int x, int y);
00084
00086 void setNormalyzeTouchCenterPosition(double x, double y);
00087
00089 void setTransformation(const GLC_Vector2d& translation, double rotation= 0.0, double scaleFactor= 1.0);
00090
00092 inline void setTranslation(const GLC_Vector2d& translation)
00093 {m_Translation= translation;}
00094
00096 inline void setRotation(double rotation)
00097 {m_Rotation= rotation;}
00098
00100 inline void setScaleFactor(double scaleFactor)
00101 {m_ScaleFactor= scaleFactor;}
00103
00105
00107 private:
00109 int m_X;
00110
00112 int m_Y;
00113
00114
00115 double m_NormalyzeX;
00116 double m_NormalyzeY;
00117
00118
00120 GLC_Vector2d m_Translation;
00121
00123 double m_Rotation;
00124
00126 double m_ScaleFactor;
00127
00129 bool m_TransformationIsSet;
00130
00131 };
00132
00133 #endif