Developer Documentation

FileVTK.hh
1 /*===========================================================================*\
2 * *
3 * OpenFlipper *
4 * Copyright (c) 2001-2015, RWTH-Aachen University *
5 * Department of Computer Graphics and Multimedia *
6 * All rights reserved. *
7 * www.openflipper.org *
8 * *
9 *---------------------------------------------------------------------------*
10 * This file is part of OpenFlipper. *
11 *---------------------------------------------------------------------------*
12 * *
13 * Redistribution and use in source and binary forms, with or without *
14 * modification, are permitted provided that the following conditions *
15 * are met: *
16 * *
17 * 1. Redistributions of source code must retain the above copyright notice, *
18 * this list of conditions and the following disclaimer. *
19 * *
20 * 2. Redistributions in binary form must reproduce the above copyright *
21 * notice, this list of conditions and the following disclaimer in the *
22 * documentation and/or other materials provided with the distribution. *
23 * *
24 * 3. Neither the name of the copyright holder nor the names of its *
25 * contributors may be used to endorse or promote products derived from *
26 * this software without specific prior written permission. *
27 * *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
30 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
31 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
32 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
33 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
34 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
35 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
36 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
37 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
38 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
39 * *
40 \*===========================================================================*/
41
42 #pragma once
43
44 #include <QObject>
45 #include <QCheckBox>
46 #include <QLabel>
47 #include <QSpinBox>
48
49 #include <OpenFlipper/common/Types.hh>
50 #include <OpenFlipper/BasePlugin/BaseInterface.hh>
51 #include <OpenFlipper/BasePlugin/FileInterface.hh>
52 #include <OpenFlipper/BasePlugin/LoadSaveInterface.hh>
53 #include <OpenFlipper/BasePlugin/LoggingInterface.hh>
54 #include <OpenFlipper/BasePlugin/ScriptInterface.hh>
55 #include <OpenFlipper/BasePlugin/INIInterface.hh>
56 #include <OpenFlipper/BasePlugin/TypeInterface.hh>
57 #include <OpenFlipper/BasePlugin/RPCInterface.hh>
58 #include <OpenFlipper/BasePlugin/StatusbarInterface.hh>
59 #include <OpenFlipper/BasePlugin/TextureInterface.hh>
60
61 #include <ObjectTypes/PolyMesh/PolyMesh.hh>
62 #include <ObjectTypes/TriangleMesh/TriangleMesh.hh>
63
64 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
65 #include <ObjectTypes/HexahedralMesh/HexahedralMesh.hh>
66 #endif
67 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
68 #include <ObjectTypes/PolyhedralMesh/PolyhedralMesh.hh>
69 #endif
70 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
71 #include <ObjectTypes/TetrahedralMesh/TetrahedralMesh.hh>
72 #endif
73
74 enum Dataset {
75 STRUCTURED_POINTS,
76 STRUCTURED_GRID,
77 RECTILINEAR_GRID,
78 POLYDATA,
79 UNSTRUCTURED_GRID
80 };
81
82 class FileVTKPlugin : public QObject, BaseInterface, FileInterface, LoadSaveInterface,
83 LoggingInterface, ScriptInterface, INIInterface, StatusbarInterface, RPCInterface, TextureInterface
84 {
85 class CellType {
86
87 public:
88
89 CellType() :
90 type(0),
91 index(-1)
92 {
93 }
94
95 // The type of the cell
96 unsigned int type;
97
98 // The index of the primitiv in the mesh that was created from this cell
99 unsigned int index;
100
101 // list of indices in the cell
102 std::vector<quint32> indices;
103 };
104
105 Q_OBJECT
106 Q_INTERFACES(FileInterface)
107 Q_INTERFACES(LoadSaveInterface)
108 Q_INTERFACES(LoggingInterface)
109 Q_INTERFACES(BaseInterface)
110 Q_INTERFACES(ScriptInterface)
111 Q_INTERFACES(INIInterface)
112 Q_INTERFACES(StatusbarInterface)
113 Q_INTERFACES(RPCInterface)
114 Q_INTERFACES(TextureInterface)
115
116 Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-VTK")
117
118 signals:
119 void openedFile( int _id );
120 void addEmptyObject( DataType _type, int& _id);
121 void load(QString _filename, DataType _type, int& _id);
122 void save(int _id , QString _filename );
123 void log(Logtype _type, QString _message);
124 void log(QString _message);
125 void updateView();
126 void updatedObject(int _identifier, const UpdateType& _type);
127
128 void emptyObjectAdded( int _id );
129 void deleteObject( int _id );
130
131 // StatusbarInterface
132 void showStatusMessage(QString _message, int _timeout = 0);
133 void setStatus( ApplicationStatus::applicationStatus _status);
134
135 //RPCInterface
136 void pluginExists( QString _pluginName , bool& _exists );
137 void functionExists( QString _pluginName , QString _functionName , bool& _exists );
138
139 //TextureInterface
140 void setTextureMode(QString _textureName, QString _mode, int _id );
141 void switchTexture( QString _textureName, int _id );
142 void addMultiTexture( QString _textureGroup, QString _name, QString _filename, int _id, int& _textureId);
143 void textureFilename( int /*_id*/, QString /*_textureName*/, QString& /*_textureFilename*/ );
144 void textureIndex(QString _name,int _id, int& _index);
145 void getCurrentTexture(int /*_id*/, QString& /*_name*/);
146 void textureName (int, int, QString &);
147 void getSubTextures (int, QString, QStringList &);
148 void textureIndexPropertyName(int, QString&);
149
150 private slots:
151
152 void fileOpened( int /*_id*/ ){};
153
154 void noguiSupported( ) {} ;
155
156 void initializePlugin();
157
159 void slotSaveDefault();
160
161
162 public :
163 enum ObjectOptionsVtk
164 {
165 NONE = 0,
166 BINARY = 1,
167 FACENORMALS = 1 << 1,
168 VERTEXNORMALS = 1 << 2,
169 VERTEXTEXCOORDS = 1 << 3,
170 };
171
172 FileVTKPlugin();
173
174 ~FileVTKPlugin() {};
175
176 QString name() { return (QString("FileVTK")); };
177 QString description( ) { return (QString(tr("Load/Save ASCII VTK-Files"))); };
178
179 DataType supportedType();
180
181 QString getSaveFilters();
182 QString getLoadFilters();
183
184 QWidget* loadOptionsWidget(QString /*_currentFilter*/);
185 QWidget* saveOptionsWidget(QString /*_currentFilter*/);
186
187 public slots:
188
190 int loadObject(QString _filename);
191
193 int loadObject(QString _filename, DataType _type);
194
195 bool saveObject(int _id, QString _filename);
196
197 QString version() { return QString("1.0"); };
198
199 private:
200
201 bool forceTriangleMesh_;
202 bool forcePolyMesh_;
203
204 QWidget* saveOptions_;
205
206 QCheckBox* saveBinary_;
207 QCheckBox* saveFaceNormals_;
208 QCheckBox* saveVertexNormals_;
209 QCheckBox* saveVertexTexCoords_;
210 QLabel* savePrecisionLabel_;
211 QSpinBox* savePrecision_;
212 QPushButton* saveDefaultButton_;
213
215 bool binary_;
216 unsigned int userWriteOptions_;
217
220 void updateUserOptions();
221
222
232 template <typename MeshT>
233 void addCellNormal(MeshT*& _mesh,const CellType& _cell, OpenMesh::Vec3d _normal);
234
243 template <typename MeshT>
244 int addTetraCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
245
254 template <typename MeshT>
255 int addHexaCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
256
265 template <typename MeshT>
266 int addWedgeCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
267
276 template <typename MeshT>
277 int addPyramidCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
278
287 template <typename MeshT>
288 int addFaceToOpenMesh(MeshT*& _mesh, std::vector<quint32> _indices);
289
300 template <typename MeshT>
301 int addFaceToOpenMesh(MeshT*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
302
308 template <typename MeshT>
309 void updateFaceNormalsOfOpenMesh(MeshT*& _mesh);
310
316 template <typename MeshT>
317 void updateVertexNormalsOfOpenMesh(MeshT*& _mesh);
318
324 template <typename MeshT>
325 void removeTemporaryPropertiesOfOpenMesh(MeshT*& _mesh);
326
334 template <typename MeshT>
335 void addVertexNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
336
344 template <typename MeshT>
345 void addFaceNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
346
352 template <typename MeshT>
353 void setNormalsOfDuplicatedVerticesOfOpenMesh(MeshT*& _mesh);
354
361 template< class MeshT >
362 bool writeASCIIDataOfOpenMesh(std::ostream& _out, MeshT& _mesh );
363
372 int addTetraCell(TriMesh*& _mesh, const std::vector<quint32>& _indices);
373
382 int addTetraCell(PolyMesh*& _mesh, const std::vector<quint32>& _indices);
383
392 int addHexaCell(TriMesh*& _mesh, const std::vector<quint32>& _indices);
393
402 int addHexaCell(PolyMesh*& _mesh, const std::vector<quint32>& _indices);
403
412 int addWedgeCell(TriMesh*& _mesh, const std::vector<quint32>& _indices);
413
422 int addWedgeCell(PolyMesh*& _mesh, const std::vector<quint32>& _indices);
423
432 int addPyramidCell(TriMesh*& _mesh, const std::vector<quint32>& _indices);
433
442 int addPyramidCell(PolyMesh*& _mesh, const std::vector<quint32>& _indices);
443
452 int addFace(TriMesh*& _mesh, const std::vector<quint32>& _indices);
453
462 int addFace(PolyMesh*& _mesh, const std::vector<quint32>& _indices);
463
474 int addFace(TriMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
475
486 int addFace(PolyMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
487
493 void updateFaceNormals(TriMesh*& _mesh);
494
500 void updateFaceNormals(PolyMesh*& _mesh);
501
507 void updateVertexNormals(TriMesh*& _mesh);
508
514 void updateVertexNormals(PolyMesh*& _mesh);
515
521 void removeTemporaryProperties(TriMesh*& _mesh);
522
528 void removeTemporaryProperties(PolyMesh*& _mesh);
529
537 void addVertexNormal(TriMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
538
546 void addVertexNormal(PolyMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
547
555 void addFaceNormal(TriMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
556
564 void addFaceNormal(PolyMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
565
571 void setNormalsOfDuplicatedVertices(TriMesh*& _mesh);
572
578 void setNormalsOfDuplicatedVertices(PolyMesh*& _mesh);
579
586 bool writeASCIIData(std::ostream& _out, TriMesh& _mesh);
587
594 bool writeASCIIData(std::ostream& _out, PolyMesh& _mesh);
595
596 #if defined(ENABLE_HEXAHEDRALMESH_SUPPORT) || defined(ENABLE_POLYHEDRALMESH_SUPPORT) || defined(ENABLE_TETRAHEDRALMESH_SUPPORT)
597
605 template <typename MeshT>
606 int addTetraCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
607
616 template <typename MeshT>
617 int addHexaCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
618
627 template <typename MeshT>
628 int addWedgeCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
629
638 template <typename MeshT>
639 int addPyramidCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
640
649 template <typename MeshT>
650 int addFaceToOpenVolumeMesh(MeshT*& _mesh, std::vector<quint32> indices);
651
662 template <typename MeshT>
663 int addFaceToOpenVolumeMesh(MeshT*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
664
672 template <typename MeshT>
673 void addVertexNormalToOpenVolumeMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
674
682 template <typename MeshT>
683 void addFaceNormalToOpenVolumeMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
684
691 template< class MeshT >
692 bool writeASCIIDataOfOpenVolumeMesh(std::ostream& _out, MeshT& _mesh );
693 #endif //ENABLE_OPENVOLUMEMESH_SUPPORT
694
695 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT
696
704 int addTetraCell(HexahedralMesh*& _mesh, const std::vector<quint32>& indices);
705
714 int addHexaCell(HexahedralMesh*& _mesh, const std::vector<quint32>& indices);
715
724 int addWedgeCell(HexahedralMesh*& _mesh, const std::vector<quint32>& indices);
725
734 int addPyramidCell(HexahedralMesh*& _mesh, const std::vector<quint32>& indices);
735
744 int addFace(HexahedralMesh*& _mesh, const std::vector<quint32>& indices);
745
756 int addFace(HexahedralMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
757
764 void updateFaceNormals(HexahedralMesh*& _mesh){/* don't need to be updated */};
765
772 void updateVertexNormals(HexahedralMesh*& _mesh){/* don't need to be updated */};
773
780 void removeTemporaryProperties(HexahedralMesh*& _mesh){/* don't need to be removed */};
781
789 void addVertexNormal(HexahedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
790
798 void addFaceNormal(HexahedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
799
807 void setNormalsOfDuplicatedVertices(HexahedralMesh*& _mesh){/* we didn't duplicate any vertices */};
808
815 bool writeASCIIData(std::ostream& _out, HexahedralMesh& _mesh);
816 #endif //ENABLE_HEXAHEDRALMESH_SUPPORT
817
818 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT
819
827 int addTetraCell(PolyhedralMesh*& _mesh, const std::vector<quint32>& indices);
828
837 int addHexaCell(PolyhedralMesh*& _mesh, const std::vector<quint32>& indices);
838
847 int addWedgeCell(PolyhedralMesh*& _mesh, const std::vector<quint32>& indices);
848
857 int addPyramidCell(PolyhedralMesh*& _mesh, const std::vector<quint32>& indices);
858
867 int addFace(PolyhedralMesh*& _mesh, const std::vector<quint32>& indices);
868
879 int addFace(PolyhedralMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
880
887 void updateFaceNormals(PolyhedralMesh*& _mesh){/* don't need to be updated */};
888
895 void updateVertexNormals(PolyhedralMesh*& _mesh){/* don't need to be updated */};
896
903 void removeTemporaryProperties(PolyhedralMesh*& _mesh){/* don't need to be removed */};
904
912 void addVertexNormal(PolyhedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
913
921 void addFaceNormal(PolyhedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
922
930 void setNormalsOfDuplicatedVertices(PolyhedralMesh*& _mesh){/* we didn't duplicate any vertices */};
931
938 bool writeASCIIData(std::ostream& _out, PolyhedralMesh& _mesh);
939 #endif //ENABLE_POLYHEDRALMESH_SUPPORT
940
941 #ifdef ENABLE_TETRAHEDRALMESH_SUPPORT
942
950 int addTetraCell(TetrahedralMesh*& _mesh, const std::vector<quint32>& indices);
951
960 int addHexaCell(TetrahedralMesh*& _mesh, const std::vector<quint32>& indices);
961
970 int addWedgeCell(TetrahedralMesh*& _mesh, const std::vector<quint32>& indices);
971
980 int addPyramidCell(TetrahedralMesh*& _mesh, const std::vector<quint32>& indices);
981
990 int addFace(TetrahedralMesh*& _mesh, const std::vector<quint32>& indices);
991
1002 int addFace(TetrahedralMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
1003
1010 void updateFaceNormals(TetrahedralMesh*& _mesh){/* don't need to be updated */};
1011
1018 void updateVertexNormals(TetrahedralMesh*& _mesh){/* don't need to be updated */};
1019
1026 void removeTemporaryProperties(TetrahedralMesh*& _mesh){/* don't need to be removed */};
1027
1035 void addVertexNormal(TetrahedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
1036
1044 void addFaceNormal(TetrahedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
1045
1053 void setNormalsOfDuplicatedVertices(TetrahedralMesh*& _mesh){/* we didn't duplicate any vertices */};
1054
1061 bool writeASCIIData(std::ostream& _out, TetrahedralMesh& _mesh);
1062 #endif //ENABLE_POLYHEDRALMESH_SUPPORT
1063
1064
1065 enum BestMeshType {
1066 BMT_None = 0,
1067 BMT_TriMesh = 1,
1068 BMT_PolyMesh = 1 << 1,
1069 BMT_HexahedralMesh = 1 << 2,
1070 BMT_PolyhedralMesh = 1 << 3,
1071 BMT_TetrahedralMesh = 1 << 4
1072 };
1073
1075 BestMeshType findBestObjectType(QString _filename);
1076
1077 template <typename MeshT>
1078 bool loadMesh(QTextStream& _stream,MeshT*& _mesh, Dataset _type);
1079
1086 template <typename MeshT>
1087 bool loadMeshPoints(QString _spec,QTextStream& _in,MeshT*& _mesh);
1088
1096 template <typename MeshT>
1097 bool loadMeshLines(QString _spec,QTextStream& _in,MeshT*& _mesh);
1098
1107 template <typename MeshT>
1108 bool loadMeshPolygons(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells);
1109
1118 template <typename MeshT>
1119 int add_non_manifold_face(MeshT*& _mesh, std::vector< OpenMesh::VertexHandle >& _vhandles);
1120
1129 template <typename MeshT>
1130 bool loadMeshTriangleStrips(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells);
1131
1140 template <typename MeshT>
1141 bool loadMeshCells(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells);
1142
1153 template <typename MeshT>
1154 bool loadMeshNormals(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells, bool _pointNormal, quint32 _count);
1155
1162 template< class MeshT >
1163 bool writeMesh(std::ostream& _out, MeshT& _mesh );
1164
1165 };
1166
1167
FileVTKPlugin::writeMesh
bool writeMesh(std::ostream &_out, MeshT &_mesh)
Writes the header of the VTK file, then calls writeASCIIData (binary VTK is currently unsupported) ...
Definition: FileVTK.cc:2763
FileVTKPlugin::slotSaveDefault
void slotSaveDefault()
Slot called when user wants to save the given Save options as default.
Definition: FileVTK.cc:186
FileVTKPlugin::writeASCIIDataOfOpenMesh
bool writeASCIIDataOfOpenMesh(std::ostream &_out, MeshT &_mesh)
Writes the data of the VTK file in ASCII format.
Definition: FileVTK.cc:375
ScriptInterface.hh
FileVTKPlugin::binary_
bool binary_
Reading binary file?
Definition: FileVTK.hh:215
FileVTKPlugin::loadMeshLines
bool loadMeshLines(QString _spec, QTextStream &_in, MeshT *&_mesh)
Reads lines from the stream and adds them to the mesh.
Definition: FileVTK.cc:1847
FileVTKPlugin::setNormalsOfDuplicatedVerticesOfOpenMesh
void setNormalsOfDuplicatedVerticesOfOpenMesh(MeshT *&_mesh)
Sets normals of duplicated vertices that were created for non-manifold meshes.
Definition: FileVTK.cc:352
LoadSaveInterface.hh
FileVTKPlugin::loadMeshNormals
bool loadMeshNormals(QString _spec, QTextStream &_in, MeshT *&_mesh, std::vector< CellType > &_cells, bool _pointNormal, quint32 _count)
Reads Normals from the stream and adds them to the mesh.
Definition: FileVTK.cc:2173
FileVTKPlugin::removeTemporaryPropertiesOfOpenMesh
void removeTemporaryPropertiesOfOpenMesh(MeshT *&_mesh)
Removed temporary properties that might have been added during file reading.
Definition: FileVTK.cc:282
FileVTKPlugin::addTetraCell
int addTetraCell(TriMesh *&_mesh, const std::vector< quint32 > &_indices)
Adds a tetra cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:465
FileVTKPlugin::updateVertexNormalsOfOpenMesh
void updateVertexNormalsOfOpenMesh(MeshT *&_mesh)
Updates vertex normals.
Definition: FileVTK.cc:276
FileVTKPlugin::addFaceNormal
void addFaceNormal(TriMesh *&_mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a face normal.
Definition: FileVTK.cc:492
FileVTKPlugin::addPyramidCellToOpenMesh
int addPyramidCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a pyramid cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:225
FileVTKPlugin::loadMeshPoints
bool loadMeshPoints(QString _spec, QTextStream &_in, MeshT *&_mesh)
Reads points from the stream and adds them to the mesh.
Definition: FileVTK.cc:1769
Logtype
Logtype
Log types for Message Window.
Definition: LoggingInterface.hh:92
FileVTKPlugin::saveOptionsWidget
QWidget * saveOptionsWidget(QString)
Definition: FileVTK.cc:137
OpenMesh::VectorT< double, 3 >
TetrahedralMesh.hh
FileVTKPlugin::loadMeshPolygons
bool loadMeshPolygons(QString _spec, QTextStream &_in, MeshT *&_mesh, std::vector< CellType > &_cells)
Reads polygons from the stream and adds them to the mesh.
Definition: FileVTK.cc:1926
DataType
Predefined datatypes.
Definition: DataTypes.hh:83
LoggingInterface
Interface for all Plugins which do logging to the logging window of the framework.
Definition: LoggingInterface.hh:112
FileVTKPlugin::updateFaceNormalsOfOpenMesh
void updateFaceNormalsOfOpenMesh(MeshT *&_mesh)
Updates face normals.
Definition: FileVTK.cc:266
FileVTKPlugin::loadMeshTriangleStrips
bool loadMeshTriangleStrips(QString _spec, QTextStream &_in, MeshT *&_mesh, std::vector< CellType > &_cells)
Reads triangle strips from the stream and adds them to the mesh.
Definition: FileVTK.cc:2075
FileVTKPlugin::addCellNormal
void addCellNormal(MeshT *&_mesh, const CellType &_cell, OpenMesh::Vec3d _normal)
Adds a normal to the cell.
Definition: FileVTK.cc:309
ApplicationStatus::applicationStatus
applicationStatus
Enum for the statusBar Status Icon.
Definition: StatusbarInterface.hh:64
FileVTKPlugin::addFaceToOpenMesh
int addFaceToOpenMesh(MeshT *&_mesh, std::vector< quint32 > _indices)
Adds a face to the mesh.
Definition: FileVTK.cc:232
FileVTKPlugin::findBestObjectType
BestMeshType findBestObjectType(QString _filename)
Reads the file to check for present primitives and returns the object type that fits best...
Definition: FileVTK.cc:1213
LoggingInterface.hh
FileVTKPlugin::addFaceNormalToOpenMesh
void addFaceNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a face normal.
Definition: FileVTK.cc:301
FileVTKPlugin::loadOptionsWidget
QWidget * loadOptionsWidget(QString)
Definition: FileVTK.cc:131
FileVTKPlugin::description
QString description()
Return a description of what the plugin is doing.
Definition: FileVTK.hh:177
FileVTKPlugin::addHexaCell
int addHexaCell(TriMesh *&_mesh, const std::vector< quint32 > &_indices)
Adds a hexa cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:468
FileVTKPlugin::loadObject
int loadObject(QString _filename)
Loads Object and converts it to a triangle mesh if possible.
Definition: FileVTK.cc:1501
FileVTKPlugin::addVertexNormalToOpenMesh
void addVertexNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a vertex normal.
Definition: FileVTK.cc:292
TriangleMesh.hh
HexahedralMesh.hh
PolyhedralMesh.hh
RPCInterface
Interface to call functions across plugins.
Definition: RPCInterface.hh:61
TypeInterface.hh
FileVTKPlugin::updateVertexNormals
void updateVertexNormals(TriMesh *&_mesh)
Updates vertex normals.
Definition: FileVTK.cc:483
FileVTKPlugin::getSaveFilters
QString getSaveFilters()
Definition: FileVTK.cc:107
FileVTKPlugin::addVertexNormal
void addVertexNormal(TriMesh *&_mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a vertex normal.
Definition: FileVTK.cc:489
UpdateType
Update type class.
Definition: UpdateType.hh:60
StatusbarInterface
Control OpenFlippers status bar.
Definition: StatusbarInterface.hh:81
PolyMesh.hh
FileVTKPlugin::FileVTKPlugin
FileVTKPlugin()
Constructor.
Definition: FileVTK.cc:69
FileVTKPlugin::addWedgeCell
int addWedgeCell(TriMesh *&_mesh, const std::vector< quint32 > &_indices)
Adds a wedge cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:471
FileInterface.hh
FileVTKPlugin::getLoadFilters
QString getLoadFilters()
Definition: FileVTK.cc:101
INIInterface
Interface class for Plugins which have to store information in ini files.
Definition: INIInterface.hh:60
FileVTKPlugin::updateUserOptions
void updateUserOptions()
Definition: FileVTK.cc:2786
OpenVolumeMesh::GeometryKernel
Definition: GeometryKernel.hh:47
FileVTKPlugin::addFace
int addFace(TriMesh *&_mesh, const std::vector< quint32 > &_indices)
Adds a face to the mesh.
Definition: FileVTK.cc:477
FileVTKPlugin::supportedType
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
Definition: FileVTK.cc:113
FileVTKPlugin::CellType
Definition: FileVTK.hh:85
ScriptInterface
Interface for all Plugins which provide scriptable Functions.
Definition: ScriptInterface.hh:58
FileVTKPlugin::noguiSupported
void noguiSupported()
Definition: FileVTK.hh:154
RPCInterface.hh
Types.hh
FileVTKPlugin::add_non_manifold_face
int add_non_manifold_face(MeshT *&_mesh, std::vector< OpenMesh::VertexHandle > &_vhandles)
Helper function for loadMeshPolygons() that takes care of adding non-manifold faces.
Definition: FileVTK.cc:2020
FileVTKPlugin::removeTemporaryProperties
void removeTemporaryProperties(TriMesh *&_mesh)
Removed temporary properties that might have been added during file reading.
Definition: FileVTK.cc:486
FileVTKPlugin::addTetraCellToOpenMesh
int addTetraCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a tetra cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:204
FileVTKPlugin::addPyramidCell
int addPyramidCell(TriMesh *&_mesh, const std::vector< quint32 > &_indices)
Adds a pyramid cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:474
StatusbarInterface.hh
FileVTKPlugin::addHexaCellToOpenMesh
int addHexaCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a hexa cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:211
FileVTKPlugin::initializePlugin
void initializePlugin()
Initialize Plugin.
Definition: FileVTK.cc:87
TextureInterface
Provide texture support for a plugin.
Definition: TextureInterface.hh:56
FileVTKPlugin::updateFaceNormals
void updateFaceNormals(TriMesh *&_mesh)
Updates face normals.
Definition: FileVTK.cc:271
FileVTKPlugin::writeASCIIData
bool writeASCIIData(std::ostream &_out, TriMesh &_mesh)
Writes the data of the VTK file in ASCII format.
Definition: FileVTK.cc:498
FileVTKPlugin::setNormalsOfDuplicatedVertices
void setNormalsOfDuplicatedVertices(TriMesh *&_mesh)
Sets normals of duplicated vertices that were created for non-manifold meshes.
Definition: FileVTK.cc:495
BaseInterface
Interface class from which all plugins have to be created.
Definition: BaseInterface.hh:65
FileVTKPlugin::loadMeshCells
bool loadMeshCells(QString _spec, QTextStream &_in, MeshT *&_mesh, std::vector< CellType > &_cells)
Reads unstructured grid data from the stream and adds it to the mesh.
Definition: FileVTK.cc:2248
BaseInterface.hh
FileInterface
Interface class for file handling.
Definition: FileInterface.hh:63
FileVTKPlugin::name
QString name()
Return a name for the plugin.
Definition: FileVTK.hh:176
FileVTKPlugin::addWedgeCellToOpenMesh
int addWedgeCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a wedge cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:218
FileVTKPlugin
Definition: FileVTK.hh:82
LoadSaveInterface
Interface for all plugins which want to Load or Save files and create Objects.
Definition: LoadSaveInterface.hh:59