Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
77 enum Dataset {
78  STRUCTURED_POINTS,
79  STRUCTURED_GRID,
80  RECTILINEAR_GRID,
81  POLYDATA,
82  UNSTRUCTURED_GRID
83 };
84 
87 {
88  class CellType {
89 
90  public:
91 
92  CellType() :
93  type(0),
94  index(-1)
95  {
96  }
97 
98  // The type of the cell
99  unsigned int type;
100 
101  // The index of the primitiv in the mesh that was created from this cell
102  unsigned int index;
103 
104  // list of indices in the cell
105  std::vector<quint32> indices;
106  };
107 
108  Q_OBJECT
109  Q_INTERFACES(FileInterface)
110  Q_INTERFACES(LoadSaveInterface)
111  Q_INTERFACES(LoggingInterface)
112  Q_INTERFACES(BaseInterface)
113  Q_INTERFACES(ScriptInterface)
114  Q_INTERFACES(INIInterface)
115  Q_INTERFACES(StatusbarInterface)
116  Q_INTERFACES(RPCInterface)
117  Q_INTERFACES(TextureInterface)
118 
119 #if QT_VERSION >= 0x050000
120  Q_PLUGIN_METADATA(IID "org.OpenFlipper.Plugins.Plugin-VTK")
121 #endif
122 
123  signals:
124  void openedFile( int _id );
125  void addEmptyObject( DataType _type, int& _id);
126  void load(QString _filename, DataType _type, int& _id);
127  void save(int _id , QString _filename );
128  void log(Logtype _type, QString _message);
129  void log(QString _message);
130  void updateView();
131  void updatedObject(int _identifier, const UpdateType& _type);
132 
133  void emptyObjectAdded( int _id );
134  void deleteObject( int _id );
135 
136  // StatusbarInterface
137  void showStatusMessage(QString _message, int _timeout = 0);
138  void setStatus( ApplicationStatus::applicationStatus _status);
139 
140  //RPCInterface
141  void pluginExists( QString _pluginName , bool& _exists );
142  void functionExists( QString _pluginName , QString _functionName , bool& _exists );
143 
144  //TextureInterface
145  void setTextureMode(QString _textureName, QString _mode, int _id );
146  void switchTexture( QString _textureName, int _id );
147  void addMultiTexture( QString _textureGroup, QString _name, QString _filename, int _id, int& _textureId);
148  void textureFilename( int /*_id*/, QString /*_textureName*/, QString& /*_textureFilename*/ );
149  void textureIndex(QString _name,int _id, int& _index);
150  void getCurrentTexture(int /*_id*/, QString& /*_name*/);
151  void textureName (int, int, QString &);
152  void getSubTextures (int, QString, QStringList &);
153  void textureIndexPropertyName(int, QString&);
154 
155  private slots:
156 
157  void fileOpened( int /*_id*/ ){};
158 
159  void noguiSupported( ) {} ;
160 
161  void initializePlugin();
162 
164  void slotSaveDefault();
165 
166 
167  public :
168  enum ObjectOptionsVtk
169  {
170  NONE = 0,
171  BINARY = 1,
172  FACENORMALS = 1 << 1,
173  VERTEXNORMALS = 1 << 2,
174  VERTEXTEXCOORDS = 1 << 3,
175  };
176 
177  FileVTKPlugin();
178 
179  ~FileVTKPlugin() {};
180 
181  QString name() { return (QString("FileVTK")); };
182  QString description( ) { return (QString(tr("Load/Save ASCII VTK-Files"))); };
183 
185 
186  QString getSaveFilters();
187  QString getLoadFilters();
188 
189  QWidget* loadOptionsWidget(QString /*_currentFilter*/);
190  QWidget* saveOptionsWidget(QString /*_currentFilter*/);
191 
192  public slots:
193 
195  int loadObject(QString _filename);
196 
198  int loadObject(QString _filename, DataType _type);
199 
200  bool saveObject(int _id, QString _filename);
201 
202  QString version() { return QString("1.0"); };
203 
204  private:
205 
206  bool forceTriangleMesh_;
207  bool forcePolyMesh_;
208 
209  QWidget* saveOptions_;
210 
211  QCheckBox* saveBinary_;
212  QCheckBox* saveFaceNormals_;
213  QCheckBox* saveVertexNormals_;
214  QCheckBox* saveVertexTexCoords_;
215  QLabel* savePrecisionLabel_;
216  QSpinBox* savePrecision_;
217  QPushButton* saveDefaultButton_;
218 
220  bool binary_;
221  unsigned int userWriteOptions_;
222 
225  void updateUserOptions();
226 
227 
237  template <typename MeshT>
238  void addCellNormal(MeshT*& _mesh,const CellType& _cell, OpenMesh::Vec3d _normal);
239 
248  template <typename MeshT>
249  int addTetraCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
250 
259  template <typename MeshT>
260  int addHexaCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
261 
270  template <typename MeshT>
271  int addWedgeCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
272 
281  template <typename MeshT>
282  int addPyramidCellToOpenMesh(MeshT _mesh, std::vector<quint32> _indices);
283 
292  template <typename MeshT>
293  int addFaceToOpenMesh(MeshT*& _mesh, std::vector<quint32> _indices);
294 
305  template <typename MeshT>
306  int addFaceToOpenMesh(MeshT*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
307 
313  template <typename MeshT>
314  void updateFaceNormalsOfOpenMesh(MeshT*& _mesh);
315 
321  template <typename MeshT>
322  void updateVertexNormalsOfOpenMesh(MeshT*& _mesh);
323 
329  template <typename MeshT>
330  void removeTemporaryPropertiesOfOpenMesh(MeshT*& _mesh);
331 
339  template <typename MeshT>
340  void addVertexNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
341 
349  template <typename MeshT>
350  void addFaceNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
351 
357  template <typename MeshT>
358  void setNormalsOfDuplicatedVerticesOfOpenMesh(MeshT*& _mesh);
359 
366  template< class MeshT >
367  bool writeASCIIDataOfOpenMesh(std::ostream& _out, MeshT& _mesh );
368 
377  int addTetraCell(TriMesh*& _mesh, std::vector<quint32> _indices);
378 
387  int addTetraCell(PolyMesh*& _mesh, std::vector<quint32> _indices);
388 
397  int addHexaCell(TriMesh*& _mesh, std::vector<quint32> _indices);
398 
407  int addHexaCell(PolyMesh*& _mesh, std::vector<quint32> _indices);
408 
417  int addWedgeCell(TriMesh*& _mesh, std::vector<quint32> _indices);
418 
427  int addWedgeCell(PolyMesh*& _mesh, std::vector<quint32> _indices);
428 
437  int addPyramidCell(TriMesh*& _mesh, std::vector<quint32> _indices);
438 
447  int addPyramidCell(PolyMesh*& _mesh, std::vector<quint32> _indices);
448 
457  int addFace(TriMesh*& _mesh, std::vector<quint32> _indices);
458 
467  int addFace(PolyMesh*& _mesh, std::vector<quint32> _indices);
468 
479  int addFace(TriMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
480 
491  int addFace(PolyMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
492 
498  void updateFaceNormals(TriMesh*& _mesh);
499 
505  void updateFaceNormals(PolyMesh*& _mesh);
506 
512  void updateVertexNormals(TriMesh*& _mesh);
513 
519  void updateVertexNormals(PolyMesh*& _mesh);
520 
526  void removeTemporaryProperties(TriMesh*& _mesh);
527 
533  void removeTemporaryProperties(PolyMesh*& _mesh);
534 
542  void addVertexNormal(TriMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
543 
551  void addVertexNormal(PolyMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
552 
560  void addFaceNormal(TriMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
561 
569  void addFaceNormal(PolyMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
570 
576  void setNormalsOfDuplicatedVertices(TriMesh*& _mesh);
577 
583  void setNormalsOfDuplicatedVertices(PolyMesh*& _mesh);
584 
591  bool writeASCIIData(std::ostream& _out, TriMesh& _mesh);
592 
599  bool writeASCIIData(std::ostream& _out, PolyMesh& _mesh);
600 
601 #ifdef ENABLE_OPENVOLUMEMESH_SUPPORT
602 
610  template <typename MeshT>
611  int addTetraCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
612 
621  template <typename MeshT>
622  int addHexaCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
623 
632  template <typename MeshT>
633  int addWedgeCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
634 
643  template <typename MeshT>
644  int addPyramidCellToOpenVolumeMesh(MeshT _mesh, std::vector<quint32> _indices);
645 
654  template <typename MeshT>
655  int addFaceToOpenVolumeMesh(MeshT*& _mesh, std::vector<quint32> indices);
656 
667  template <typename MeshT>
668  int addFaceToOpenVolumeMesh(MeshT*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
669 
677  template <typename MeshT>
678  void addVertexNormalToOpenVolumeMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
679 
687  template <typename MeshT>
688  void addFaceNormalToOpenVolumeMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal);
689 
696  template< class MeshT >
697  bool writeASCIIDataOfOpenVolumeMesh(std::ostream& _out, MeshT& _mesh );
698 #endif //ENABLE_OPENVOLUMEMESH_SUPPORT
699 
700 #ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
701 
709  int addTetraCell(HexahedralMesh*& _mesh, std::vector<quint32> indices);
710 
719  int addHexaCell(HexahedralMesh*& _mesh, std::vector<quint32> indices);
720 
729  int addWedgeCell(HexahedralMesh*& _mesh, std::vector<quint32> indices);
730 
739  int addPyramidCell(HexahedralMesh*& _mesh, std::vector<quint32> indices);
740 
749  int addFace(HexahedralMesh*& _mesh, std::vector<quint32> indices);
750 
761  int addFace(HexahedralMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
762 
769  void updateFaceNormals(HexahedralMesh*& _mesh){/* don't need to be updated */};
770 
777  void updateVertexNormals(HexahedralMesh*& _mesh){/* don't need to be updated */};
778 
785  void removeTemporaryProperties(HexahedralMesh*& _mesh){/* don't need to be removed */};
786 
794  void addVertexNormal(HexahedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
795 
803  void addFaceNormal(HexahedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
804 
812  void setNormalsOfDuplicatedVertices(HexahedralMesh*& _mesh){/* we didn't duplicate any vertices */};
813 
820  bool writeASCIIData(std::ostream& _out, HexahedralMesh& _mesh);
821 #endif //ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
822 
823 #ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
824 
832  int addTetraCell(PolyhedralMesh*& _mesh, std::vector<quint32> indices);
833 
842  int addHexaCell(PolyhedralMesh*& _mesh, std::vector<quint32> indices);
843 
852  int addWedgeCell(PolyhedralMesh*& _mesh, std::vector<quint32> indices);
853 
862  int addPyramidCell(PolyhedralMesh*& _mesh, std::vector<quint32> indices);
863 
872  int addFace(PolyhedralMesh*& _mesh, std::vector<quint32> indices);
873 
884  int addFace(PolyhedralMesh*& _mesh, quint32 _index1, quint32 _index2, quint32 _index3);
885 
892  void updateFaceNormals(PolyhedralMesh*& _mesh){/* don't need to be updated */};
893 
900  void updateVertexNormals(PolyhedralMesh*& _mesh){/* don't need to be updated */};
901 
908  void removeTemporaryProperties(PolyhedralMesh*& _mesh){/* don't need to be removed */};
909 
917  void addVertexNormal(PolyhedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
918 
926  void addFaceNormal(PolyhedralMesh*& _mesh, quint32 _index, OpenMesh::Vec3d _normal);
927 
935  void setNormalsOfDuplicatedVertices(PolyhedralMesh*& _mesh){/* we didn't duplicate any vertices */};
936 
943  bool writeASCIIData(std::ostream& _out, PolyhedralMesh& _mesh);
944 #endif //ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT
945 
946 
947  enum BestMeshType {
948  BMT_None = 0,
949  BMT_TriMesh = 1,
950  BMT_PolyMesh = 1 << 1,
951  BMT_HexahedralMesh = 1 << 2,
952  BMT_PolyhedralMesh = 1 << 3
953  };
954 
956  BestMeshType findBestObjectType(QString _filename);
957 
958  template <typename MeshT>
959  bool loadMesh(QTextStream& _stream,MeshT*& _mesh, Dataset _type);
960 
967  template <typename MeshT>
968  bool loadMeshPoints(QString _spec,QTextStream& _in,MeshT*& _mesh);
969 
977  template <typename MeshT>
978  bool loadMeshLines(QString _spec,QTextStream& _in,MeshT*& _mesh);
979 
988  template <typename MeshT>
989  bool loadMeshPolygons(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells);
990 
999  template <typename MeshT>
1000  int add_non_manifold_face(MeshT*& _mesh, std::vector< OpenMesh::VertexHandle >& _vhandles);
1001 
1010  template <typename MeshT>
1011  bool loadMeshTriangleStrips(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells);
1012 
1021  template <typename MeshT>
1022  bool loadMeshCells(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells);
1023 
1034  template <typename MeshT>
1035  bool loadMeshNormals(QString _spec,QTextStream& _in,MeshT*& _mesh, std::vector<CellType>& _cells, bool _pointNormal, quint32 _count);
1036 
1043  template< class MeshT >
1044  bool writeMesh(std::ostream& _out, MeshT& _mesh );
1045 
1046 };
1047 
1048 
1049 #endif //FILEVTKPLUGIN_HH
BestMeshType findBestObjectType(QString _filename)
Reads the file to check for present primitives and returns the object type that fits best...
Definition: FileVTK.cc:1204
QString getSaveFilters()
Definition: FileVTK.cc:114
void setNormalsOfDuplicatedVertices(TriMesh *&_mesh)
Sets normals of duplicated vertices that were created for non-manifold meshes.
Definition: FileVTK.cc:499
Interface class from which all plugins have to be created.
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:2679
bool writeASCIIData(std::ostream &_out, TriMesh &_mesh)
Writes the data of the VTK file in ASCII format.
Definition: FileVTK.cc:502
void updateFaceNormals(TriMesh *&_mesh)
Updates face normals.
Definition: FileVTK.cc:275
Interface class for Plugins which have to store information in ini files.
Definition: INIInterface.hh:81
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:2184
Logtype
Log types for Message Window.
void addVertexNormal(TriMesh *&_mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a vertex normal.
Definition: FileVTK.cc:493
applicationStatus
Enum for the statusBar Status Icon.
int addPyramidCell(TriMesh *&_mesh, std::vector< quint32 > _indices)
Adds a pyramid cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:478
void addFaceNormal(TriMesh *&_mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a face normal.
Definition: FileVTK.cc:496
Update type class.
Definition: UpdateType.hh:70
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:1956
int addFaceToOpenMesh(MeshT *&_mesh, std::vector< quint32 > _indices)
Adds a face to the mesh.
Definition: FileVTK.cc:236
int addHexaCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a hexa cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:215
int addFace(TriMesh *&_mesh, std::vector< quint32 > _indices)
Adds a face to the mesh.
Definition: FileVTK.cc:481
Interface for all Plugins which do logging to the logging window of the framework.
int addPyramidCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a pyramid cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:229
QWidget * saveOptionsWidget(QString)
Definition: FileVTK.cc:141
void updateUserOptions()
Definition: FileVTK.cc:2702
void initializePlugin()
Initialize Plugin.
Definition: FileVTK.cc:94
Interface class for file handling.
QString description()
Return a description of what the plugin is doing.
Definition: FileVTK.hh:182
Interface to call functions across plugins.
Definition: RPCInterface.hh:71
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:1862
bool loadMeshPoints(QString _spec, QTextStream &_in, MeshT *&_mesh)
Reads points from the stream and adds them to the mesh.
Definition: FileVTK.cc:1705
void updateFaceNormalsOfOpenMesh(MeshT *&_mesh)
Updates face normals.
Definition: FileVTK.cc:270
bool writeASCIIDataOfOpenMesh(std::ostream &_out, MeshT &_mesh)
Writes the data of the VTK file in ASCII format.
Definition: FileVTK.cc:379
void noguiSupported()
Definition: FileVTK.hh:159
int addWedgeCell(TriMesh *&_mesh, std::vector< quint32 > _indices)
Adds a wedge cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:475
DataType supportedType()
Return your supported object type( e.g. DATA_TRIANGLE_MESH )
Definition: FileVTK.cc:120
void removeTemporaryProperties(TriMesh *&_mesh)
Removed temporary properties that might have been added during file reading.
Definition: FileVTK.cc:490
Interface for all Plugins which provide scriptable Functions.
void removeTemporaryPropertiesOfOpenMesh(MeshT *&_mesh)
Removed temporary properties that might have been added during file reading.
Definition: FileVTK.cc:286
void updateVertexNormals(TriMesh *&_mesh)
Updates vertex normals.
Definition: FileVTK.cc:487
void slotSaveDefault()
Slot called when user wants to save the given Save options as default.
Definition: FileVTK.cc:190
bool loadMeshLines(QString _spec, QTextStream &_in, MeshT *&_mesh)
Reads lines from the stream and adds them to the mesh.
Definition: FileVTK.cc:1783
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:2109
int addTetraCell(TriMesh *&_mesh, std::vector< quint32 > _indices)
Adds a tetra cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:469
Interface for all plugins which want to Load or Save files and create Objects.
QWidget * loadOptionsWidget(QString)
Definition: FileVTK.cc:135
int loadObject(QString _filename)
Loads Object and converts it to a triangle mesh if possible.
Definition: FileVTK.cc:1474
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:208
bool binary_
Reading binary file?
Definition: FileVTK.hh:220
void updateVertexNormalsOfOpenMesh(MeshT *&_mesh)
Updates vertex normals.
Definition: FileVTK.cc:280
void setNormalsOfDuplicatedVerticesOfOpenMesh(MeshT *&_mesh)
Sets normals of duplicated vertices that were created for non-manifold meshes.
Definition: FileVTK.cc:356
void addVertexNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a vertex normal.
Definition: FileVTK.cc:296
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:2011
FileVTKPlugin()
Constructor.
Definition: FileVTK.cc:76
Control OpenFlippers status bar.
QString name()
Return a name for the plugin.
Definition: FileVTK.hh:181
Predefined datatypes.
Definition: DataTypes.hh:96
Provide texture support for a plugin.
void addFaceNormalToOpenMesh(MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal)
Adds a face normal.
Definition: FileVTK.cc:305
int addHexaCell(TriMesh *&_mesh, std::vector< quint32 > _indices)
Adds a hexa cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:472
void addCellNormal(MeshT *&_mesh, const CellType &_cell, OpenMesh::Vec3d _normal)
Adds a normal to the cell.
Definition: FileVTK.cc:313
int addWedgeCellToOpenMesh(MeshT _mesh, std::vector< quint32 > _indices)
Adds a wedge cell to the mesh. (Does nothing, yet)
Definition: FileVTK.cc:222