GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_mover.h
Go to the documentation of this file.
1 /****************************************************************************
2 
3  This file is part of the GLC-lib library.
4  Copyright (C) 2005-2008 Laurent Ribon (laumaya@users.sourceforge.net)
5  http://glc-lib.sourceforge.net
6 
7  GLC-lib is free software; you can redistribute it and/or modify
8  it under the terms of the GNU Lesser General Public License as published by
9  the Free Software Foundation; either version 3 of the License, or
10  (at your option) any later version.
11 
12  GLC-lib is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU Lesser General Public License for more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with GLC-lib; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  *****************************************************************************/
22 
24 
25 #ifndef GLC_MOVER_H_
26 #define GLC_MOVER_H_
27 
28 #include "glc_repmover.h"
29 #include "../maths/glc_vector3d.h"
30 #include "glc_userinput.h"
31 
32 #include <QObject>
33 #include <QList>
34 
35 #include "../glc_config.h"
36 
37 class GLC_Viewport;
38 
41 
42 
43 class GLC_LIB_EXPORT GLC_Mover : public QObject
44 {
45  Q_OBJECT
46 
47 public:
49  GLC_Mover(GLC_Viewport*, const QList<GLC_RepMover*>&);
50 
52  GLC_Mover(const GLC_Mover&);
53 
55  virtual ~GLC_Mover();
56 
57 
59 
61 
62 public:
64  virtual GLC_Mover* clone() const= 0;
66 
68 
70 
71 public:
73  virtual void init(const GLC_UserInput& userInput)= 0;
74 
76  virtual bool move(const GLC_UserInput& userInput)= 0;
77 
79  virtual void ends(){}
80 
82  void setRepresentationsList(const QList<GLC_RepMover*>&);
83 
85  void initRepresentation();
86 
88  void updateRepresentation();
89 
90 
92 
94 
96 
97 public:
99  void renderRepresentation();
100 
102 
103 signals:
105  void updated();
106 
108 // Private services Functions
110 private:
112  void clearMoverRepresentation();
113 
115 // Protected Members
117 protected:
119  QList<GLC_RepMover*> m_RepMoverList;
120 
123 
126 
129 };
130 
131 #endif /* GLC_MOVER_H_ */

©2005-2013 Laurent Ribon