GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_offtoworld.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_OFFTOWORLD_H_
26 #define GLC_OFFTOWORLD_H_
27 
28 #include <QString>
29 #include <QObject>
30 #include <QFile>
31 #include <QTextStream>
32 #include <QColor>
33 #include <QList>
34 
35 #include "../maths/glc_vector3d.h"
36 #include "../maths/glc_vector2df.h"
37 #include "../maths/glc_vector3df.h"
38 #include "../geometry/glc_mesh.h"
39 
40 #include "../glc_config.h"
41 
42 class GLC_World;
43 class QGLContext;
44 
47 
57 
58 
59 class GLC_LIB_EXPORT GLC_OffToWorld : public QObject
60 {
61  Q_OBJECT
63 
65 
66 
67 public:
69  virtual ~GLC_OffToWorld();
71 
72 
74 
75 public:
77  GLC_World* CreateWorldFromOff(QFile &file);
79 
81 
83 
84 private:
86  void clear();
87 
89  void extractVertex(QString &);
90 
92  void extractNbrVertexsAndNbrFaces(QString &);
93 
95  void extractFaceIndex(QString &);
96 
98  void computeNormal();
99 
100 
102 
104 // Qt Signals
106  signals:
107  void currentQuantum(int);
108 
110  /* Private members */
112 private:
115 
117  QString m_FileName;
118 
121 
124 
127 
130 
133 
135  bool m_IsCoff;
136 
138  bool m_Is4off;
139 
140  // The position bulk data
141  QList<float> m_PositionBulk;
142 
144  QList<float> m_NormalBulk;
145 
147  QList<float> m_ColorBulk;
148 
151 
152 
153 
154 
155 };
156 
157 #endif /*GLC_OFFTOWORLD_H_*/

©2005-2013 Laurent Ribon