GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
glc_stltoworld.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_STLTOWORLD_H_
26 #define GLC_STLTOWORLD_H_
27 
28 #include <QString>
29 #include <QObject>
30 #include <QFile>
31 #include <QTextStream>
32 
33 #include "../geometry/glc_mesh.h"
34 #include "../maths/glc_vector3df.h"
35 
36 #include "../glc_config.h"
37 
38 class GLC_World;
39 class QGLContext;
40 
43 
51 
52 
53 class GLC_LIB_EXPORT GLC_StlToWorld : public QObject
54 {
55  Q_OBJECT
57 
59 
60 public:
62  virtual ~GLC_StlToWorld();
64 
65 
67 
68 public:
70  GLC_World* CreateWorldFromStl(QFile &file);
72 
74 
76 
77 private:
79  void clear();
81  void scanFacet();
83  GLC_Vector3df extract3dVect(QString &);
85  void LoadBinariStl(QFile &);
86 
87 
88 
90 
92 // Qt Signals
94  signals:
95  void currentQuantum(int);
96 
98  /* Private members */
100 private:
103 
105  QString m_FileName;
106 
109 
111  QTextStream m_StlStream;
112 
115 
118 
120  QList<float> m_VertexBulk;
121 
123  QList<float> m_NormalBulk;
124 
127 };
128 
129 #endif /*GLC_STLTOWORLD_H_*/

©2005-2013 Laurent Ribon