glc_userinput.cpp
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 #include "glc_userinput.h"
00026
00027 GLC_UserInput::GLC_UserInput(int x, int y)
00028 : m_X(x)
00029 , m_Y(y)
00030 , m_NormalyzeX(0.0)
00031 , m_NormalyzeY(0.0)
00032 , m_Translation()
00033 , m_Rotation(0.0)
00034 , m_ScaleFactor(1.0)
00035 , m_TransformationIsSet(false)
00036 {
00037
00038 }
00039
00040 GLC_UserInput::~GLC_UserInput()
00041 {
00042
00043 }
00044
00046
00048 void GLC_UserInput::setPosition(int x, int y)
00049 {
00050 m_X= x;
00051 m_Y= y;
00052 }
00053
00054 void GLC_UserInput::setNormalyzeTouchCenterPosition(double x, double y)
00055 {
00056 m_NormalyzeX= x;
00057 m_NormalyzeY= y;
00058 }
00059
00060 void GLC_UserInput::setTransformation(const GLC_Vector2d& translation, double rotation, double scaleFactor)
00061 {
00062 m_Translation= translation;
00063 m_Rotation= rotation;
00064 m_ScaleFactor= scaleFactor;
00065
00066 m_TransformationIsSet= true;
00067 }