glc_mover.h

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 #ifndef GLC_MOVER_H_
00026 #define GLC_MOVER_H_
00027 
00028 #include "glc_repmover.h"
00029 #include "../maths/glc_vector3d.h"
00030 #include "glc_userinput.h"
00031 
00032 #include <QObject>
00033 #include <QList>
00034 
00035 #include "../glc_config.h"
00036 
00037 class GLC_Viewport;
00038 
00041 
00042 
00043 class GLC_LIB_EXPORT GLC_Mover : public QObject
00044 {
00045         Q_OBJECT
00046 
00047 public:
00049         GLC_Mover(GLC_Viewport*, const QList<GLC_RepMover*>&);
00050 
00052         GLC_Mover(const GLC_Mover&);
00053 
00055         virtual ~GLC_Mover();
00056 
00057 
00059 
00061 
00062 public:
00064         virtual GLC_Mover* clone() const= 0;
00066 
00068 
00070 
00071 public:
00073         virtual void init(const GLC_UserInput& userInput)= 0;
00074 
00076         virtual bool move(const GLC_UserInput& userInput)= 0;
00077 
00079         virtual void ends(){}
00080 
00082         void setRepresentationsList(const QList<GLC_RepMover*>&);
00083 
00085         void initRepresentation();
00086 
00088         void updateRepresentation();
00089 
00090 
00092 
00094 
00096 
00097 public:
00099         void renderRepresentation();
00100 
00102 
00103 signals:
00105         void updated();
00106 
00108 // Private services Functions
00110 private:
00112         void clearMoverRepresentation();
00113 
00115 // Protected Members
00117 protected:
00119         QList<GLC_RepMover*> m_RepMoverList;
00120 
00122         GLC_Vector3d m_PreviousVector;
00123 
00125         GLC_Viewport* m_pViewport;
00126 
00128         GLC_RepMover::RepMoverInfo m_MoverInfo;
00129 };
00130 
00131 #endif /* GLC_MOVER_H_ */

SourceForge.net Logo

©2005-2011 Laurent Ribon