glc_userinput.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 
00003  This file is part of the GLC-lib library.
00004  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
00005  http://glc-lib.sourceforge.net
00006 
00007  GLC-lib is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU Lesser General Public License as published by
00009  the Free Software Foundation; either version 3 of the License, or
00010  (at your option) any later version.
00011 
00012  GLC-lib is distributed in the hope that it will be useful,
00013  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  GNU Lesser General Public License for more details.
00016 
00017  You should have received a copy of the GNU Lesser General Public License
00018  along with GLC-lib; if not, write to the Free Software
00019  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
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 // Set Functions
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 }

SourceForge.net Logo

©2005-2011 Laurent Ribon