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 /*===========================================================================*\
43 * *
44 * $Revision$ *
45 * $LastChangedBy$ *
46 * $Date$ *
47 * *
48 \*===========================================================================*/
49 
50 #ifndef FILEVTKPLUGIN_HH
51 #define FILEVTKPLUGIN_HH
52 
53 #include <QObject>
54 
61 #include <OpenFlipper/BasePlugin/INIInterface.hh>
65 #include <OpenFlipper/BasePlugin/TextureInterface.hh>
66 
69 
70 #ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
72 #endif
73 #ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
75 #endif
76 #ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
78 #endif
79 
80 enum Dataset {
81  STRUCTURED_POINTS,
82  STRUCTURED_GRID,
83  RECTILINEAR_GRID,
84  POLYDATA,
85  UNSTRUCTURED_GRID
86 };
87 
90 {
91  class CellType {
92 
93  public:
94 
95  CellType() :
96  type(0),
97  index(-1)
98  {
99  }
100 
101  // The type of the cell
102  unsigned int type;
103 
104  // The index of the primitiv in the mesh that was created from this cell
105  unsigned int index;
106 
107  // list of indices in the cell
108  std::vector<quint32> indices;
109  };
110 
111  Q_OBJECT
112  Q_INTERFACES(FileInterface)
113  Q_INTERFACES(LoadSaveInterface)
114  Q_INTERFACES(LoggingInterface)
115  Q_INTERFACES(BaseInterface)
116  Q_INTERFACES(ScriptInterface)
117  Q_INTERFACES(INIInterface)
118  Q_INTERFACES(StatusbarInterface)
119  Q_INTERFACES(RPCInterface)
120  Q_INTERFACES(TextureInterface)
121 
122 #if QT_VERSION >= 0x050000
123  Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-VTK")
124 #endif
125 
126  signals:
127  void openedFile( int _id );
128  void addEmptyObject( DataType _type, int& _id);
129  void load(QString _filename, DataType _type, int& _id);
130  void save(int _id , QString _filename );
131  void log(Logtype _type, QString _message);
132  void log(QString _message);
133  void updateView();
134  void updatedObject(int _identifier, const UpdateType& _type);
135 
136  void emptyObjectAdded( int _id );
137  void deleteObject( int _id );
138 
139  // StatusbarInterface
140  void showStatusMessage(QString _message, int _timeout = 0);
141  void setStatus( ApplicationStatus::applicationStatus _status);
142 
143  //RPCInterface
144  void pluginExists( QString _pluginName , bool& _exists );
145  void functionExists( QString _pluginName , QString _functionName , bool& _exists );
146 
147  //TextureInterface
148  void setTextureMode(QString _textureName, QString _mode, int _id );
149  void switchTexture( QString _textureName, int _id );
150  void addMultiTexture( QString _textureGroup, QString _name, QString _filename, int _id, int& _textureId);
151  void textureFilename( int /*_id*/, QString /*_textureName*/, QString& /*_textureFilename*/ );
152  void textureIndex(QString _name,int _id, int& _index);
153  void getCurrentTexture(int /*_id*/, QString& /*_name*/);
154  void textureName (int, int, QString &);
155  void getSubTextures (int, QString, QStringList &);
156  void textureIndexPropertyName(int, QString&);
157 
158  private slots:
159 
160  void fileOpened( int /*_id*/ ){};
161 
162  void noguiSupported( ) {} ;
163 
164  void initializePlugin();
165 
167  void slotSaveDefault();
168 
169 
170  public :
171  enum ObjectOptionsVtk
172  {
173  NONE = 0,
174  BINARY = 1,
175  FACENORMALS = 1 << 1,
176  VERTEXNORMALS = 1 << 2,
177  VERTEXTEXCOORDS = 1 << 3,
178  };
179 
180  FileVTKPlugin();
181 
182  ~FileVTKPlugin() {};
183 
184  QString name() { return (QString("FileVTK")); };
185  QString description( ) { return (QString(tr("Load/Save ASCII VTK-Files"))); };
186 
188 
189  QString getSaveFilters();
190  QString getLoadFilters();
191 
192  QWidget* loadOptionsWidget(QString /*_currentFilter*/);
193  QWidget* saveOptionsWidget(QString /*_currentFilter*/);
194 
195  public slots:
196 
198  int loadObject(QString _filename);
199 
201  int loadObject(QString _filename, DataType _type);
202 
203  bool saveObject(int _id, QString _filename);
204 
205  QString version() { return QString("1.0"); };
206 
207  private:
208 
209  bool forceTriangleMesh_;
210  bool forcePolyMesh_;
211 
212  QWidget* saveOptions_;
213 
214  QCheckBox* saveBinary_;
215  QCheckBox* saveFaceNormals_;
216  QCheckBox* saveVertexNormals_;
217  QCheckBox* saveVertexTexCoords_;
218  QLabel* savePrecisionLabel_;
219  QSpinBox* savePrecision_;
220  QPushButton* saveDefaultButton_;
221 
223  bool binary_;
224  unsigned int userWriteOptions_;
225 
228  void updateUserOptions();
229 
230 
240  template <typename MeshT>
241  void addCellNormal(MeshT*& _mesh,const CellType& _cell, OpenMesh::Vec3d _normal);
242 
251  template <typename MeshT>
252  int addTetraCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
253 
262  template <typename MeshT>
263  int addHexaCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
264 
273  template <typename MeshT>
274  int addWedgeCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
275 
284  template <typename MeshT>
285  int addPyramidCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
286 
295  template <typename MeshT>
296  int addFaceToOpenMesh(MeshT*& _mesh, std::vector<quint32> _indices);
297 
308  template <typename MeshT>
309  int addFaceToOpenMesh(MeshT*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
310 
316  template <typename MeshT>
317  void updateFaceNormalsOfOpenMesh(MeshT*& _mesh);
318 
324  template <typename MeshT>
325  void updateVertexNormalsOfOpenMesh(MeshT*& _mesh);
326 
332  template <typename MeshT>
333  void removeTemporaryPropertiesOfOpenMesh(MeshT*& _mesh);
334 
342  template <typename MeshT>
343  void addVertexNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
344 
352  template <typename MeshT>
353  void addFaceNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
354 
360  template <typename MeshT>
361  void setNormalsOfDuplicatedVerticesOfOpenMesh(MeshT*& _mesh);
362 
369  template< class MeshT >
370  bool writeASCIIDataOfOpenMesh(std::ostream& _out, MeshT& _mesh );
371 
380  int addTetraCell(TriMesh*& _mesh, std::vector<quint32> _indices);
381 
390  int addTetraCell(PolyMesh*& _mesh, std::vector<quint32> _indices);
391 
400  int addHexaCell(TriMesh*& _mesh, std::vector<quint32> _indices);
401 
410  int addHexaCell(PolyMesh*& _mesh, std::vector<quint32> _indices);
411 
420  int addWedgeCell(TriMesh*& _mesh, std::vector<quint32> _indices);
421 
430  int addWedgeCell(PolyMesh*& _mesh, std::vector<quint32> _indices);
431 
440  int addPyramidCell(TriMesh*& _mesh, std::vector<quint32> _indices);
441 
450  int addPyramidCell(PolyMesh*& _mesh, std::vector<quint32> _indices);
451 
460  int addFace(TriMesh*& _mesh, std::vector<quint32> _indices);
461 
470  int addFace(PolyMesh*& _mesh, std::vector<quint32> _indices);
471 
482  int addFace(TriMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
483 
494  int addFace(PolyMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
495 
501  void updateFaceNormals(TriMesh*& _mesh);
502 
508  void updateFaceNormals(PolyMesh*& _mesh);
509 
515  void updateVertexNormals(TriMesh*& _mesh);
516 
522  void updateVertexNormals(PolyMesh*& _mesh);
523 
529  void removeTemporaryProperties(TriMesh*& _mesh);
530 
536  void removeTemporaryProperties(PolyMesh*& _mesh);
537 
545  void addVertexNormal(TriMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
546 
554  void addVertexNormal(PolyMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
555 
563  void addFaceNormal(TriMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
564 
572  void addFaceNormal(PolyMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
573 
579  void setNormalsOfDuplicatedVertices(TriMesh*& _mesh);
580 
586  void setNormalsOfDuplicatedVertices(PolyMesh*& _mesh);
587 
594  bool writeASCIIData(std::ostream& _out, TriMesh& _mesh);
595 
602  bool writeASCIIData(std::ostream& _out, PolyMesh& _mesh);
603 
604 #ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
605 
613  template <typename MeshT>
614  int addTetraCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
615 
624  template <typename MeshT>
625  int addHexaCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
626 
635  template <typename MeshT>
636  int addWedgeCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
637 
646  template <typename MeshT>
647  int addPyramidCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
648 
657  template <typename MeshT>
658  int addFaceToOpenVolumeMesh(MeshT*& _mesh, std::vector<quint32> indices);
659 
670  template <typename MeshT>
671  int addFaceToOpenVolumeMesh(MeshT*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
672 
680  template <typename MeshT>
681  void addVertexNormalToOpenVolumeMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
682 
690  template <typename MeshT>
691  void addFaceNormalToOpenVolumeMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
692 
699  template< class MeshT >
700  bool writeASCIIDataOfOpenVolumeMesh(std::ostream& _out, MeshT& _mesh );
701 #endif //ENABLE_OPENVOLUMEMESH_SUPPORT
702 
703 #ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
704 
712  int addTetraCell(HexahedralMesh*& _mesh, std::vector<quint32> indices);
713 
722  int addHexaCell(HexahedralMesh*& _mesh, std::vector<quint32> indices);
723 
732  int addWedgeCell(HexahedralMesh*& _mesh, std::vector<quint32> indices);
733 
742  int addPyramidCell(HexahedralMesh*& _mesh, std::vector<quint32> indices);
743 
752  int addFace(HexahedralMesh*& _mesh, std::vector<quint32> indices);
753 
764  int addFace(HexahedralMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
765 
772  void updateFaceNormals(HexahedralMesh*& _mesh){/* don't need to be updated */};
773 
780  void updateVertexNormals(HexahedralMesh*& _mesh){/* don't need to be updated */};
781 
788  void removeTemporaryProperties(HexahedralMesh*& _mesh){/* don't need to be removed */};
789 
797  void addVertexNormal(HexahedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
798 
806  void addFaceNormal(HexahedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
807 
815  void setNormalsOfDuplicatedVertices(HexahedralMesh*& _mesh){/* we didn't duplicate any vertices */};
816 
823  bool writeASCIIData(std::ostream& _out, HexahedralMesh& _mesh);
824 #endif //ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
825 
826 #ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
827 
835  int addTetraCell(PolyhedralMesh*& _mesh, std::vector<quint32> indices);
836 
845  int addHexaCell(PolyhedralMesh*& _mesh, std::vector<quint32> indices);
846 
855  int addWedgeCell(PolyhedralMesh*& _mesh, std::vector<quint32> indices);
856 
865  int addPyramidCell(PolyhedralMesh*& _mesh, std::vector<quint32> indices);
866 
875  int addFace(PolyhedralMesh*& _mesh, std::vector<quint32> indices);
876 
887  int addFace(PolyhedralMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
888 
895  void updateFaceNormals(PolyhedralMesh*& _mesh){/* don't need to be updated */};
896 
903  void updateVertexNormals(PolyhedralMesh*& _mesh){/* don't need to be updated */};
904 
911  void removeTemporaryProperties(PolyhedralMesh*& _mesh){/* don't need to be removed */};
912 
920  void addVertexNormal(PolyhedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
921 
929  void addFaceNormal(PolyhedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
930 
938  void setNormalsOfDuplicatedVertices(PolyhedralMesh*& _mesh){/* we didn't duplicate any vertices */};
939 
946  bool writeASCIIData(std::ostream& _out, PolyhedralMesh& _mesh);
947 #endif //ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
948 
949 #ifdef ENABLE_OPENVOLUMEMESH_TETRAHEDRAL_SUPPORT
950 
958  int addTetraCell(TetrahedralMesh*& _mesh, std::vector<quint32> indices);
959 
968  int addHexaCell(TetrahedralMesh*& _mesh, std::vector<quint32> indices);
969 
978  int addWedgeCell(TetrahedralMesh*& _mesh, std::vector<quint32> indices);
979 
988  int addPyramidCell(TetrahedralMesh*& _mesh, std::vector<quint32> indices);
989 
998  int addFace(TetrahedralMesh*& _mesh, std::vector<quint32> indices);
999 
1010  int addFace(TetrahedralMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
1011 
1018  void updateFaceNormals(TetrahedralMesh*& _mesh){/* don't need to be updated */};
1019 
1026  void updateVertexNormals(TetrahedralMesh*& _mesh){/* don't need to be updated */};
1027 
1034  void removeTemporaryProperties(TetrahedralMesh*& _mesh){/* don't need to be removed */};
1035 
1043  void addVertexNormal(TetrahedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
1044 
1052  void addFaceNormal(TetrahedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
1053 
1061  void setNormalsOfDuplicatedVertices(TetrahedralMesh*& _mesh){/* we didn't duplicate any vertices */};
1062 
1069  bool writeASCIIData(std::ostream& _out, TetrahedralMesh& _mesh);
1070 #endif //ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
1071 
1072 
1073  enum BestMeshType {
1074  BMT_None = 0,
1075  BMT_TriMesh = 1,
1076  BMT_PolyMesh = 1 << 1,
1077  BMT_HexahedralMesh = 1 << 2,
1078  BMT_PolyhedralMesh = 1 << 3,
1079  BMT_TetrahedralMesh = 1 << 4
1080  };
1081 
1083  BestMeshType findBestObjectType(QString _filename);
1084 
1085  template <typename MeshT>
1086  bool loadMesh(QTextStream& _stream,MeshT*& _mesh, Dataset _type);
1087 
1094  template <typename MeshT>
1095  bool loadMeshPoints(QString _spec,QTextStream& _in,MeshT*& _mesh);
1096 
1104  template <typename MeshT>
1105  bool loadMeshLines(QString _spec,QTextStream& _in,MeshT*& _mesh);
1106 
1115  template <typename MeshT>
1116  bool loadMeshPolygons(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells);
1117 
1126  template <typename MeshT>
1127  int add_non_manifold_face(MeshT*& _mesh, std::vector< OpenMesh::VertexHandle >& _vhandles);
1128 
1137  template <typename MeshT>
1138  bool loadMeshTriangleStrips(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells);
1139 
1148  template <typename MeshT>
1149  bool loadMeshCells(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells);
1150 
1161  template <typename MeshT>
1162  bool loadMeshNormals(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells, bool _pointNormal, quint32 _count);
1163 
1170  template< class MeshT >
1171  bool writeMesh(std::ostream& _out, MeshT& _mesh );
1172 
1173 };
1174 
1175 
1176 #endif //FILEVTKPLUGIN_HH
void slotSaveDefault()
Slot called when user wants to save the given Save options as default.
Definition: FileVTK.cc:193
void updateVertexNormalsOfOpenMesh(MeshT *&_mesh)
Updates vertex normals.
Definition: FileVTK.cc:283
Predefined datatypes.
Definition: DataTypes.hh:96
void updateFaceNormalsOfOpenMesh(MeshT *&_mesh)
Updates face normals.
Definition: FileVTK.cc:273
Logtype
Log types for Message Window.
int loadObject(QString _filename)
Loads Object and converts it to a triangle mesh if possible.
Definition: FileVTK.cc:1508
void initializePlugin()
Initialize Plugin.
Definition: FileVTK.cc:94
int addHexaCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a hexa cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:218
Control OpenFlippers status bar.
bool loadMeshLines(QString _spec, QTextStream &_in, MeshT *&_mesh)
Reads lines from the stream and adds them to the mesh.
Definition: FileVTK.cc:1845
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
Definition: FileVTK.cc:120
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:1924
QString name()
Return a name for the plugin.
Definition: FileVTK.hh:184
QString getLoadFilters()
Definition: FileVTK.cc:108
int addTetraCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a tetra cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:211
Interface for all Plugins which provide scriptable Functions.
void addCellNormal(MeshT *&_mesh, const CellType &_cell, OpenMesh::Vec3d _normal)
Adds a normal to the cell.
Definition: FileVTK.cc:316
Interface class for Plugins which have to store information in ini files.
Definition: INIInterface.hh:81
Interface class from which all plugins have to be created.
int addHexaCell(TriMesh *&_mesh, std::vector< quint32 > _indices)
Adds a hexa cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:475
Update type class.
Definition: UpdateType.hh:70
Interface for all Plugins which do logging to the logging window of the framework.
void updateFaceNormals(TriMesh *&_mesh)
Updates face normals.
Definition: FileVTK.cc:278
void updateVertexNormals(TriMesh *&_mesh)
Updates vertex normals.
Definition: FileVTK.cc:490
QWidget * loadOptionsWidget(QString)
Definition: FileVTK.cc:138
bool binary_
Reading binary file?
Definition: FileVTK.hh:223
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:2761
void removeTemporaryProperties(TriMesh *&_mesh)
Removed temporary properties that might have been added during file reading.
Definition: FileVTK.cc:493
BestMeshType findBestObjectType(QString _filename)
Reads the file to check for present primitives and returns the object type that fits best...
Definition: FileVTK.cc:1220
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:2018
void addFaceNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a face normal.
Definition: FileVTK.cc:308
bool writeASCIIData(std::ostream &_out, TriMesh &_mesh)
Writes the data of the VTK file in ASCII format.
Definition: FileVTK.cc:505
int addWedgeCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a wedge cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:225
Interface class for file handling.
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:2171
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:2246
int addTetraCell(TriMesh *&_mesh, std::vector< quint32 > _indices)
Adds a tetra cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:472
Provide texture support for a plugin.
void noguiSupported()
Definition: FileVTK.hh:162
void addVertexNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a vertex normal.
Definition: FileVTK.cc:299
int addFaceToOpenMesh(MeshT *&_mesh, std::vector< quint32 > _indices)
Adds a face to the mesh.
Definition: FileVTK.cc:239
FileVTKPlugin()
Constructor.
Definition: FileVTK.cc:76
void updateUserOptions()
Definition: FileVTK.cc:2784
applicationStatus
Enum for the statusBar Status Icon.
QWidget * saveOptionsWidget(QString)
Definition: FileVTK.cc:144
void addFaceNormal(TriMesh *&_mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a face normal.
Definition: FileVTK.cc:499
void removeTemporaryPropertiesOfOpenMesh(MeshT *&_mesh)
Removed temporary properties that might have been added during file reading.
Definition: FileVTK.cc:289
int addPyramidCell(TriMesh *&_mesh, std::vector< quint32 > _indices)
Adds a pyramid cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:481
Interface for all plugins which want to Load or Save files and create Objects.
void setNormalsOfDuplicatedVertices(TriMesh *&_mesh)
Sets normals of duplicated vertices that were created for non-manifold meshes.
Definition: FileVTK.cc:502
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:2073
bool writeASCIIDataOfOpenMesh(std::ostream &_out, MeshT &_mesh)
Writes the data of the VTK file in ASCII format.
Definition: FileVTK.cc:382
int addWedgeCell(TriMesh *&_mesh, std::vector< quint32 > _indices)
Adds a wedge cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:478
QString getSaveFilters()
Definition: FileVTK.cc:114
void addVertexNormal(TriMesh *&_mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a vertex normal.
Definition: FileVTK.cc:496
bool loadMeshPoints(QString _spec, QTextStream &_in, MeshT *&_mesh)
Reads points from the stream and adds them to the mesh.
Definition: FileVTK.cc:1767
void setNormalsOfDuplicatedVerticesOfOpenMesh(MeshT *&_mesh)
Sets normals of duplicated vertices that were created for non-manifold meshes.
Definition: FileVTK.cc:359
Interface to call functions across plugins.
Definition: RPCInterface.hh:71
QString description()
Return a description of what the plugin is doing.
Definition: FileVTK.hh:185
int addPyramidCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a pyramid cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:232
int addFace(TriMesh *&_mesh, std::vector< quint32 > _indices)
Adds a face to the mesh.
Definition: FileVTK.cc:484