Developer Documentation

Classes | Public Types | Public Slots | Signals | Public Member Functions | Private Types | Private Slots | Private Member Functions | Private Attributes | List of all members
FileVTKPlugin Class Reference
Inheritance diagram for FileVTKPlugin:

## Classes
class | CellType

## Public Types
enum | ObjectOptionsVtk { NONE = 0, BINARY = 1, FACENORMALS = 1 << 1, VERTEXNORMALS = 1 << 2, VERTEXTEXCOORDS = 1 << 3 }

## Public Slots
int | loadObject (QString _filename)
| Loads Object and converts it to a triangle mesh if possible.
int | loadObject (QString _filename, DataType _type)
| load object and force type More...
bool | saveObject (int _id, QString _filename)
QString | version ()

## Signals
void | openedFile (int _id)
void | addEmptyObject (DataType _type, int &_id)
void | load (QString _filename, DataType _type, int &_id)
void | save (int _id, QString _filename)
void | log (Logtype _type, QString _message)
void | log (QString _message)
void | updateView ()
void | updatedObject (int _identifier, const UpdateType &_type)
void | emptyObjectAdded (int _id)
void | deleteObject (int _id)
void | showStatusMessage (QString _message, int _timeout=0)
void | setStatus (ApplicationStatus::applicationStatus _status)
void | pluginExists (QString _pluginName, bool &_exists)
void | functionExists (QString _pluginName, QString _functionName, bool &_exists)
void | setTextureMode (QString _textureName, QString _mode, int _id)
void | switchTexture (QString _textureName, int _id)
void | addMultiTexture (QString _textureGroup, QString _name, QString _filename, int _id, int &_textureId)
void | textureFilename (int, QString, QString &)
void | textureIndex (QString _name, int _id, int &_index)
void | getCurrentTexture (int, QString &)
void | textureName (int, int, QString &)
void | getSubTextures (int, QString, QStringList &)
void | textureIndexPropertyName (int, QString &)
Signals inherited from BaseInterface
virtual void | updateView ()
| Update current view in Main Application. More...
virtual void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
| Set a description for a public slot. More...
virtual void | setRenderer (unsigned int _viewer, QString _rendererName)
| Set a renderer for the given viewer. More...
Signals inherited from FileInterface
virtual void | openedFile (int _id)
| This signal has to be emitted if an object has been loaded from a file. More...
Signals inherited from LoadSaveInterface
virtual void | save (int _id, QString _filename)
| Save object to a file. More...
virtual void | load (QString _filename, DataType _type, int &_id)
| Load object from file with a specific DataType. More...
Signals inherited from LoggingInterface
virtual void | log (Logtype _type, QString _message)=0
virtual void | log (QString _message)=0
Signals inherited from ScriptInterface
virtual void | scriptInfo (QString _functionWithParameters)
| Emit this signal if a scriptable function is executed. More...
virtual void | getScriptingEngine (QScriptEngine *&_engine)
virtual void | executeScript (QString _script)
virtual void | getAvailableFunctions (QStringList &_functions)
Signals inherited from StatusbarInterface
virtual void | showStatusMessage (QString _message, int _timeout=0)
| Show a message in the status bar. More...
Signals inherited from RPCInterface
virtual void | pluginExists (QString _pluginName, bool &_exists)
Signals inherited from TextureInterface
virtual void | addTexture (QString _name, QString _filename, uint _dimension, int _id)
| Emit this Signal if a texture has been added (Property Name,filename,Dimension) More...

## Public Member Functions
| FileVTKPlugin ()
| Constructor.
QString | name ()
| Return a name for the plugin. More...
QString | description ()
| Return a description of what the plugin is doing. More...
DataType | supportedType ()
| Return your supported object type( e.g. DATA_TRIANGLE_MESH ) More...
QString | getSaveFilters ()
QString | getLoadFilters ()
QWidget * | loadOptionsWidget (QString)
QWidget * | saveOptionsWidget (QString)

## Private Types
enum | BestMeshType { BMT_None = 0, BMT_TriMesh = 1, BMT_PolyMesh = 1 << 1, BMT_HexahedralMesh = 1 << 2, BMT_PolyhedralMesh = 1 << 3, BMT_TetrahedralMesh = 1 << 4 }

## Private Slots
void | fileOpened (int)
Private Slots inherited from BaseInterface
virtual void | exit ()
virtual QString | version ()
| Return a version string for your plugin. More...
Private Slots inherited from FileInterface
virtual int | loadObject (QString _filename)=0
| Load an object from the given file. More...
virtual int | loadObject (QString _filename, DataType _type)
| Load an object from the given file. More...

## Private Member Functions
void | noguiSupported ()
void | initializePlugin ()
| Initialize Plugin. More...
void | slotSaveDefault ()
| Slot called when user wants to save the given Save options as default.
void | updateUserOptions ()
template<typename MeshT >
void | addCellNormal (MeshT *&_mesh, const CellType &_cell, OpenMesh::Vec3d _normal)
| Adds a normal to the cell. More...
template<typename MeshT >
int | addTetraCellToOpenMesh (MeshT _mesh, std::vector< quint32 > _indices)
| Adds a tetra cell to the mesh. (Does nothing, yet) More...
template<typename MeshT >
int | addHexaCellToOpenMesh (MeshT _mesh, std::vector< quint32 > _indices)
| Adds a hexa cell to the mesh. (Does nothing, yet) More...
template<typename MeshT >
int | addWedgeCellToOpenMesh (MeshT _mesh, std::vector< quint32 > _indices)
| Adds a wedge cell to the mesh. (Does nothing, yet) More...
template<typename MeshT >
int | addPyramidCellToOpenMesh (MeshT _mesh, std::vector< quint32 > _indices)
| Adds a pyramid cell to the mesh. (Does nothing, yet) More...
template<typename MeshT >
int | addFaceToOpenMesh (MeshT *&_mesh, std::vector< quint32 > _indices)
| Adds a face to the mesh. More...
template<typename MeshT >
int | addFaceToOpenMesh (MeshT *&_mesh, quint32 _index1, quint32 _index2, quint32 _index3)
| Adds a face to the mesh. More...
template<typename MeshT >
void | updateFaceNormalsOfOpenMesh (MeshT *&_mesh)
| Updates face normals. More...
template<typename MeshT >
void | updateVertexNormalsOfOpenMesh (MeshT *&_mesh)
| Updates vertex normals. More...
template<typename MeshT >
void | removeTemporaryPropertiesOfOpenMesh (MeshT *&_mesh)
| Removed temporary properties that might have been added during file reading. More...
template<typename MeshT >
void | addVertexNormalToOpenMesh (MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal)
| Adds a vertex normal. More...
template<typename MeshT >
void | addFaceNormalToOpenMesh (MeshT _mesh, quint32 _index, OpenMesh::Vec3d _normal)
| Adds a face normal. More...
template<typename MeshT >
void | setNormalsOfDuplicatedVerticesOfOpenMesh (MeshT *&_mesh)
| Sets normals of duplicated vertices that were created for non-manifold meshes. More...
template<class MeshT >
bool | writeASCIIDataOfOpenMesh (std::ostream &_out, MeshT &_mesh)
| Writes the data of the VTK file in ASCII format. More...
int | addTetraCell (TriMesh *&_mesh, const std::vector< quint32 > &_indices)
| Adds a tetra cell to the mesh. (Does nothing, yet) More...
int | addTetraCell (PolyMesh *&_mesh, const std::vector< quint32 > &_indices)
| Adds a tetra cell to the mesh. (Does nothing, yet) More...
int | addHexaCell (TriMesh *&_mesh, const std::vector< quint32 > &_indices)
| Adds a hexa cell to the mesh. (Does nothing, yet) More...
int | addHexaCell (PolyMesh *&_mesh, const std::vector< quint32 > &_indices)
| Adds a hexa cell to the mesh. (Does nothing, yet) More...
int | addWedgeCell (TriMesh *&_mesh, const std::vector< quint32 > &_indices)
| Adds a wedge cell to the mesh. (Does nothing, yet) More...
int | addWedgeCell (PolyMesh *&_mesh, const std::vector< quint32 > &_indices)
| Adds a wedge cell to the mesh. (Does nothing, yet) More...
int | addPyramidCell (TriMesh *&_mesh, const std::vector< quint32 > &_indices)
| Adds a pyramid cell to the mesh. (Does nothing, yet) More...
int | addPyramidCell (PolyMesh *&_mesh, const std::vector< quint32 > &_indices)
| Adds a pyramid cell to the mesh. (Does nothing, yet) More...
int | addFace (TriMesh *&_mesh, const std::vector< quint32 > &_indices)
| Adds a face to the mesh. More...
int | addFace (PolyMesh *&_mesh, const std::vector< quint32 > &_indices)
| Adds a face to the mesh. More...
int | addFace (TriMesh *&_mesh, quint32 _index1, quint32 _index2, quint32 _index3)
| Adds a face to the mesh. More...
int | addFace (PolyMesh *&_mesh, quint32 _index1, quint32 _index2, quint32 _index3)
| Adds a face to the mesh. More...
void | updateFaceNormals (TriMesh *&_mesh)
| Updates face normals. More...
void | updateFaceNormals (PolyMesh *&_mesh)
| Updates face normals. More...
void | updateVertexNormals (TriMesh *&_mesh)
| Updates vertex normals. More...
void | updateVertexNormals (PolyMesh *&_mesh)
| Updates vertex normals. More...
void | removeTemporaryProperties (TriMesh *&_mesh)
| Removed temporary properties that might have been added during file reading. More...
void | removeTemporaryProperties (PolyMesh *&_mesh)
| Removed temporary properties that might have been added during file reading. More...
void | addVertexNormal (TriMesh *&_mesh, quint32 _index, OpenMesh::Vec3d _normal)
| Adds a vertex normal. More...
void | addVertexNormal (PolyMesh *&_mesh, quint32 _index, OpenMesh::Vec3d _normal)
| Adds a vertex normal. More...
void | addFaceNormal (TriMesh *&_mesh, quint32 _index, OpenMesh::Vec3d _normal)
| Adds a face normal. More...
void | addFaceNormal (PolyMesh *&_mesh, quint32 _index, OpenMesh::Vec3d _normal)
| Adds a face normal. More...
void | setNormalsOfDuplicatedVertices (TriMesh *&_mesh)
| Sets normals of duplicated vertices that were created for non-manifold meshes. More...
void | setNormalsOfDuplicatedVertices (PolyMesh *&_mesh)
| Sets normals of duplicated vertices that were created for non-manifold meshes. More...
bool | writeASCIIData (std::ostream &_out, TriMesh &_mesh)
| Writes the data of the VTK file in ASCII format. More...
bool | writeASCIIData (std::ostream &_out, PolyMesh &_mesh)
| Writes the data of the VTK file in ASCII format. More...
BestMeshType | findBestObjectType (QString _filename)
| Reads the file to check for present primitives and returns the object type that fits best.
template<typename MeshT >
bool | loadMesh (QTextStream &_stream, MeshT *&_mesh, Dataset _type)
template<typename MeshT >
bool | loadMeshPoints (QString _spec, QTextStream &_in, MeshT *&_mesh)
| Reads points from the stream and adds them to the mesh. More...
template<typename MeshT >
bool | loadMeshLines (QString _spec, QTextStream &_in, MeshT *&_mesh)
| Reads lines from the stream and adds them to the mesh. More...
template<typename MeshT >
bool | loadMeshPolygons (QString _spec, QTextStream &_in, MeshT *&_mesh, std::vector< CellType > &_cells)
| Reads polygons from the stream and adds them to the mesh. More...
template<typename MeshT >
int | add_non_manifold_face (MeshT *&_mesh, std::vector< OpenMesh::VertexHandle > &_vhandles)
| Helper function for loadMeshPolygons() that takes care of adding non-manifold faces. More...
template<typename MeshT >
bool | loadMeshTriangleStrips (QString _spec, QTextStream &_in, MeshT *&_mesh, std::vector< CellType > &_cells)
| Reads triangle strips from the stream and adds them to the mesh. More...
template<typename MeshT >
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. More...
template<typename MeshT >
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. More...
template<class MeshT >
bool | writeMesh (std::ostream &_out, MeshT &_mesh)
| Writes the header of the VTK file, then calls writeASCIIData (binary VTK is currently unsupported) More...
Private Member Functions inherited from BaseInterface
virtual | ~BaseInterface ()
| Destructor.
virtual void | blockScenegraphUpdates (bool _block)
| Tell the core to prevent scenegraph updates. More...
virtual void | updatedObject (int _objectId)
| An object has been changed or added by this plugin. More...
virtual void | updatedObject (int _identifier, const UpdateType &_type)
| An object has been changed or added by this plugin. More...
virtual void | nodeVisibilityChanged (int _identifier)
| A scenegraph node has been shown or hidden. More...
virtual void | getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
| Get the current renderer for the given viewer. More...
Private Member Functions inherited from FileInterface
virtual | ~FileInterface ()
| Destructor.
virtual bool | saveObject (int _id, QString _filename)=0
| Save an object from the given file. More...
virtual bool | saveObjects (IdList _ids, QString _filename)
| Save multiple objects to one file. More...
Private Member Functions inherited from LoadSaveInterface
virtual | ~LoadSaveInterface ()
| Destructor.
virtual void | addEmptyObject (DataType _type, int &_id)
virtual void | copyObject (int _oldId, int &_newId)
virtual void | emptyObjectAdded (int _id)
| DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. More...
virtual void | deleteObject (int _id)
| Delete an object This signal can be called from any thread. . More...
virtual void | deleteAllObjects ()
| Delete all Objects. More...
virtual void | getAllFileFilters (QStringList &_filters)
| Get all file filters that are registered. More...
Private Member Functions inherited from LoggingInterface
virtual | ~LoggingInterface ()
| Destructor.
Private Member Functions inherited from ScriptInterface
virtual | ~ScriptInterface ()
| Destructor.
virtual void | executeFileScript (QString _filename)
virtual void | getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
Private Member Functions inherited from INIInterface
virtual | ~INIInterface ()
| Destructor.
Private Member Functions inherited from StatusbarInterface
virtual | ~StatusbarInterface ()
| Destructor.
void | setStatus (ApplicationStatus::applicationStatus _status)
| Sets the status icon of the StatusBar. More...
void | clearStatusMessage ()
| Removes the current message from the statusBar. More...
void | addWidgetToStatusbar (QWidget *_widget)
| Add a widget on the right side of the statusBar. More...
Private Member Functions inherited from RPCInterface
virtual | ~RPCInterface ()
| Destructor.
virtual void | functionExists (QString _pluginName, QString _functionName, bool &_exists)
Private Member Functions inherited from TextureInterface
virtual void | addTexture (QString _name, QImage _image, uint _dimension, int _id)
| Emit this Signal if a texture has been added (Property Name,image,Dimension) More...
virtual void | addTexture (QString _name, QString _filename, uint _dimension)
| Emit this Signal if a texture has been added (Property Name,filename,Dimension) More...
virtual void | addTexture (QString _name, QImage _image, uint _dimension)
| Emit this Signal if a texture has been added (Property Name,image,Dimension) More...
virtual void | addMultiTexture (QString _textureGroup, QString _name, QString _filename, int _id, int &_textureId)
| Emit this Signal if you want to add a texture for a multitexturing mode. More...
virtual void | addMultiTexture (QString _textureGroup, QString _name, QImage _image, int _id, int &_textureId)
| Emit this Signal if you want to add a texture for a multitexturing mode. More...
virtual void | updateTexture (QString _textureName, int _identifier)
| Tell Plugins to update the given texture for the given identifier This signal can be called from any thread. .
virtual void | updateAllTextures ()
| Tell Plugins to update all textures.
virtual void | updatedTextures (QString, int)
| emit this signal if you updated a texture More...
virtual void | switchTexture (QString _textureName, int _id)
| emit this signal if you want to switch the texture of a specific object This signal can be called from any thread.
virtual void | switchTexture (QString _textureName)
| emit this signal if you want to switch the global texture This signal can be called from any thread.
virtual void | setTextureMode (QString _textureName, QString _mode)
| emit this signal if you want to set a special mode for this texture (Clamping,...) More...
virtual void | setTextureMode (QString _textureName, QString _mode, int _id)
| emit this signal if you want to set a special mode for this texture (Clamping,...) More...
virtual void | textureChangeImage (QString _textureName, QImage &_image, int _id)
| Change the texture image of a given texture. More...
virtual void | textureChangeImage (QString _textureName, QImage &_image)
| Change the texture image of a given global texture. More...
virtual void | textureGetImage (QString _textureName, QImage &_image, int _id)
| get the texture image of a given texture More...
virtual void | textureGetImage (QString _textureName, QImage &_image)
| Get the texture image of a given global texture. More...
virtual void | textureIndex (QString _textureName, int _id, int &_index)
| Get the texture index of a given texture. More...
virtual void | textureIndexPropertyName (int _id, QString &_propertyName)
| Get the name of the texture index property. More...
virtual void | textureName (int _id, int _textureIndex, QString &_textureName)
| get the name of the texture with given texture index More...
virtual void | textureFilename (int _id, QString _textureName, QString &_textureFilename)
| get the filename of the texture with given texture index More...
virtual void | getCurrentTexture (int _id, QString &_textureName)
| get the name of the texture which is currently enabled More...
virtual void | getSubTextures (int _id, QString _multiTextureName, QStringList &_subTextures)
| get the names of all sub-textures under the given multiTexture More...
virtual | ~TextureInterface ()
| Destructor.

## Private Attributes
bool | forceTriangleMesh_
bool | forcePolyMesh_
QWidget * | saveOptions_
QCheckBox * | saveBinary_
QCheckBox * | saveFaceNormals_
QCheckBox * | saveVertexNormals_
QCheckBox * | saveVertexTexCoords_
QLabel * | savePrecisionLabel_
QSpinBox * | savePrecision_
QPushButton * | saveDefaultButton_
bool | binary_
| Reading binary file?
unsigned int | userWriteOptions_

## Detailed Description

Definition at line 82 of file FileVTK.hh.

## Member Function Documentation

## ◆ add_non_manifold_face()

template<typename MeshT >

int FileVTKPlugin::add_non_manifold_face | ( | MeshT *& | _mesh,
|  | std::vector< OpenMesh::VertexHandle > & | _vhandles
| ) |  |
| private

Helper function for loadMeshPolygons() that takes care of adding non-manifold faces.

Parameters

  _mesh | Mesh to work on
  _vhandles | Non-manifold face to be added

Returns
  idx of first added face

Definition at line 2020 of file FileVTK.cc.

## ◆ addCellNormal()

template<typename MeshT >

void FileVTKPlugin::addCellNormal | ( | MeshT *& | _mesh,
|  | const CellType & | _cell,
|  | OpenMesh::Vec3d | _normal
| ) |  |
| private

Adds a normal to the cell.

The cell may refer to any kind of primitves described by the vtk standard (vertex, face, triangle strip, etc)

Parameters

  _mesh | Mesh to work on
  _cell | Description of the cell including its type and its index in the mesh
  _normal | The normal

Definition at line 309 of file FileVTK.cc.

## ◆ addFace() [1/4]

int FileVTKPlugin::addFace | ( | TriMesh *& | _mesh,
|  | const std::vector< quint32 > & | _indices
| ) |  |
| private

Adds a face to the mesh.

Parameters

  _mesh | Mesh the face is added to
  _indices | Indices of the vertices of the face, counter clockwise order

Returns
  index of the first added primitive

Definition at line 477 of file FileVTK.cc.

## ◆ addFace() [2/4]

int FileVTKPlugin::addFace | ( | PolyMesh *& | _mesh,
|  | const std::vector< quint32 > & | _indices
| ) |  |
| private

Adds a face to the mesh.

Parameters

  _mesh | Mesh the face is added to
  _indices | Indices of the vertices of the face, counter clockwise order

Returns
  index of the first added primitive

Definition at line 478 of file FileVTK.cc.

## ◆ addFace() [3/4]

int FileVTKPlugin::addFace | ( | TriMesh *& | _mesh,
|  | quint32 | _index1,
|  | quint32 | _index2,
|  | quint32 | _index3
| ) |  |
| private

Adds a face to the mesh.

Parameters

  _mesh | Mesh the face is added to
  _index1 | First index of the vertices of the face, counter clockwise order
  _index2 | Second index of the vertices of the face, counter clockwise order
  _index3 | Third index of the vertices of the face, counter clockwise order

Returns
  index of the first added primitive

Definition at line 480 of file FileVTK.cc.

## ◆ addFace() [4/4]

int FileVTKPlugin::addFace | ( | PolyMesh *& | _mesh,
|  | quint32 | _index1,
|  | quint32 | _index2,
|  | quint32 | _index3
| ) |  |
| private

Adds a face to the mesh.

Parameters

  _mesh | Mesh the face is added to
  _index1 | First index of the vertices of the face, counter clockwise order
  _index2 | Second index of the vertices of the face, counter clockwise order
  _index3 | Third index of the vertices of the face, counter clockwise order

Returns
  index of the first added primitive

Definition at line 481 of file FileVTK.cc.

## ◆ addFaceNormal() [1/2]

void FileVTKPlugin::addFaceNormal | ( | TriMesh *& | _mesh,
|  | quint32 | _index,
|  | OpenMesh::Vec3d | _normal
| ) |  |
| private

Adds a face normal.

Parameters

  _mesh | Mesh the face normal is added to
  _index | Index of the face
  _normal | Normal that is added

Definition at line 492 of file FileVTK.cc.

## ◆ addFaceNormal() [2/2]

void FileVTKPlugin::addFaceNormal | ( | PolyMesh *& | _mesh,
|  | quint32 | _index,
|  | OpenMesh::Vec3d | _normal
| ) |  |
| private

Adds a face normal.

Parameters

  _mesh | Mesh the face normal is added to
  _index | Index of the face
  _normal | Normal that is added

Definition at line 493 of file FileVTK.cc.

## ◆ addFaceNormalToOpenMesh()

template<typename MeshT >

void FileVTKPlugin::addFaceNormalToOpenMesh | ( | MeshT | _mesh,
|  | quint32 | _index,
|  | OpenMesh::Vec3d | _normal
| ) |  |
| private

Adds a face normal.

Parameters

  _mesh | Mesh the face normal is added to
  _index | Index of the face
  _normal | Normal that is added

Definition at line 301 of file FileVTK.cc.

## ◆ addFaceToOpenMesh() [1/2]

template<typename MeshT >

int FileVTKPlugin::addFaceToOpenMesh | ( | MeshT *& | _mesh,
|  | std::vector< quint32 > | _indices
| ) |  |
| private

Adds a face to the mesh.

Parameters

  _mesh | Mesh the face is added to
  _indices | Indices of the vertices of the face, counter clockwise order

Returns
  index of the first added primitive

Definition at line 232 of file FileVTK.cc.

## ◆ addFaceToOpenMesh() [2/2]

template<typename MeshT >

int FileVTKPlugin::addFaceToOpenMesh | ( | MeshT *& | _mesh,
|  | quint32 | _index1,
|  | quint32 | _index2,
|  | quint32 | _index3
| ) |  |
| private

Adds a face to the mesh.

Parameters

  _mesh | Mesh the face is added to
  _index1 | First index of the vertices of the face, counter clockwise order
  _index2 | Second index of the vertices of the face, counter clockwise order
  _index3 | Third index of the vertices of the face, counter clockwise order

Returns
  index of the first added primitive

Definition at line 257 of file FileVTK.cc.

## ◆ addHexaCell() [1/2]

int FileVTKPlugin::addHexaCell | ( | TriMesh *& | _mesh,
|  | const std::vector< quint32 > & | _indices
| ) |  |
| private

Adds a hexa cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 468 of file FileVTK.cc.

## ◆ addHexaCell() [2/2]

int FileVTKPlugin::addHexaCell | ( | PolyMesh *& | _mesh,
|  | const std::vector< quint32 > & | _indices
| ) |  |
| private

Adds a hexa cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 469 of file FileVTK.cc.

## ◆ addHexaCellToOpenMesh()

template<typename MeshT >

int FileVTKPlugin::addHexaCellToOpenMesh | ( | MeshT | _mesh,
|  | std::vector< quint32 > | _indices
| ) |  |
| private

Adds a hexa cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 211 of file FileVTK.cc.

## ◆ addPyramidCell() [1/2]

int FileVTKPlugin::addPyramidCell | ( | TriMesh *& | _mesh,
|  | const std::vector< quint32 > & | _indices
| ) |  |
| private

Adds a pyramid cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 474 of file FileVTK.cc.

## ◆ addPyramidCell() [2/2]

int FileVTKPlugin::addPyramidCell | ( | PolyMesh *& | _mesh,
|  | const std::vector< quint32 > & | _indices
| ) |  |
| private

Adds a pyramid cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 475 of file FileVTK.cc.

## ◆ addPyramidCellToOpenMesh()

template<typename MeshT >

int FileVTKPlugin::addPyramidCellToOpenMesh | ( | MeshT | _mesh,
|  | std::vector< quint32 > | _indices
| ) |  |
| private

Adds a pyramid cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 225 of file FileVTK.cc.

## ◆ addTetraCell() [1/2]

int FileVTKPlugin::addTetraCell | ( | TriMesh *& | _mesh,
|  | const std::vector< quint32 > & | _indices
| ) |  |
| private

Adds a tetra cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 465 of file FileVTK.cc.

## ◆ addTetraCell() [2/2]

int FileVTKPlugin::addTetraCell | ( | PolyMesh *& | _mesh,
|  | const std::vector< quint32 > & | _indices
| ) |  |
| private

Adds a tetra cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 466 of file FileVTK.cc.

## ◆ addTetraCellToOpenMesh()

template<typename MeshT >

int FileVTKPlugin::addTetraCellToOpenMesh | ( | MeshT | _mesh,
|  | std::vector< quint32 > | _indices
| ) |  |
| private

Adds a tetra cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 204 of file FileVTK.cc.

## ◆ addVertexNormal() [1/2]

void FileVTKPlugin::addVertexNormal | ( | TriMesh *& | _mesh,
|  | quint32 | _index,
|  | OpenMesh::Vec3d | _normal
| ) |  |
| private

Adds a vertex normal.

Parameters

  _mesh | Mesh the vertex normal is added to
  _index | Index of the vertex
  _normal | Normal that is added

Definition at line 489 of file FileVTK.cc.

## ◆ addVertexNormal() [2/2]

void FileVTKPlugin::addVertexNormal | ( | PolyMesh *& | _mesh,
|  | quint32 | _index,
|  | OpenMesh::Vec3d | _normal
| ) |  |
| private

Adds a vertex normal.

Parameters

  _mesh | Mesh the vertex normal is added to
  _index | Index of the vertex
  _normal | Normal that is added

Definition at line 490 of file FileVTK.cc.

## ◆ addVertexNormalToOpenMesh()

template<typename MeshT >

void FileVTKPlugin::addVertexNormalToOpenMesh | ( | MeshT | _mesh,
|  | quint32 | _index,
|  | OpenMesh::Vec3d | _normal
| ) |  |
| private

Adds a vertex normal.

Parameters

  _mesh | Mesh the vertex normal is added to
  _index | Index of the vertex
  _normal | Normal that is added

Definition at line 292 of file FileVTK.cc.

## ◆ addWedgeCell() [1/2]

int FileVTKPlugin::addWedgeCell | ( | TriMesh *& | _mesh,
|  | const std::vector< quint32 > & | _indices
| ) |  |
| private

Adds a wedge cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 471 of file FileVTK.cc.

## ◆ addWedgeCell() [2/2]

int FileVTKPlugin::addWedgeCell | ( | PolyMesh *& | _mesh,
|  | const std::vector< quint32 > & | _indices
| ) |  |
| private

Adds a wedge cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 472 of file FileVTK.cc.

## ◆ addWedgeCellToOpenMesh()

template<typename MeshT >

int FileVTKPlugin::addWedgeCellToOpenMesh | ( | MeshT | _mesh,
|  | std::vector< quint32 > | _indices
| ) |  |
| private

Adds a wedge cell to the mesh. (Does nothing, yet)

Parameters

  _mesh | Mesh the cell is added to
  _indices | Indices of the vertices of the cell, ordered according to vtk standard

Returns
  index of the first added primitive

Definition at line 218 of file FileVTK.cc.

## ◆ description()

QString FileVTKPlugin::description | ( |  | ) |
| inline virtual

Return a description of what the plugin is doing.

This function has to return a basic description of the plugin

Implements BaseInterface.

Definition at line 177 of file FileVTK.hh.

## ◆ getLoadFilters()

QString FileVTKPlugin::getLoadFilters | ( |  | ) |
| virtual

Return the Qt Filters for File dialogs when loading files (e.g. "Off files ( *.off )" )

Implements FileInterface.

Definition at line 101 of file FileVTK.cc.

## ◆ getSaveFilters()

QString FileVTKPlugin::getSaveFilters | ( |  | ) |
| virtual

Get the Qt Filters for Filedialogs when saving files (e.g. "Off files ( *.off )" )

Implements FileInterface.

Definition at line 107 of file FileVTK.cc.

## ◆ initializePlugin()

void FileVTKPlugin::initializePlugin | ( |  | ) |
| private virtual

Initialize Plugin.

This slot is called if the plugin is loaded and has to be initialized. All initialization stuff in this slot has to stay inside the plugin, no external signals are allowed here (and will be ignored). Don't create any objects via PluginFunctions here. Use the pluginsInitialized() slot for external initialization. After execution of this slot your plugin should be fully functional. Only gui elements may be uninitialized and should be created in pluginsInitialized().

Reimplemented from BaseInterface.

Definition at line 87 of file FileVTK.cc.

## ◆ loadMeshCells()

template<typename MeshT >

bool FileVTKPlugin::loadMeshCells | ( | QString | _spec,
|  | QTextStream & | _in,
|  | MeshT *& | _mesh,
|  | std::vector< CellType > & | _cells
| ) |  |
| private

Reads unstructured grid data from the stream and adds it to the mesh.

Parameters

  _spec | Line containing the CELL header
  _in | Textstream (after reading the CELL header)
  _mesh | Mesh to work on
  _cells | Cell descriptions

Definition at line 2248 of file FileVTK.cc.

## ◆ loadMeshLines()

template<typename MeshT >

bool FileVTKPlugin::loadMeshLines | ( | QString | _spec,
|  | QTextStream & | _in,
|  | MeshT *& | _mesh
| ) |  |
| private

Reads lines from the stream and adds them to the mesh.

Parameters

  _spec | Line containing the LINES header
  _in | Textstream (after reading the LINES header)
  _mesh | Mesh to work on

Definition at line 1847 of file FileVTK.cc.

## ◆ loadMeshNormals()

template<typename MeshT >

bool FileVTKPlugin::loadMeshNormals | ( | QString | _spec,
|  | QTextStream & | _in,
|  | MeshT *& | _mesh,
|  | std::vector< CellType > & | _cells,
|  | bool | _pointNormal,
|  | quint32 | _count
| ) |  |
| private

Reads Normals from the stream and adds them to the mesh.

Parameters

  _spec | Line containing the NORMALS header
  _in | Textstream (after reading the NORMALS header)
  _mesh | Mesh to work on
  _cells | Cell descriptions
  _pointNormal | point or face normals?
  _count | Number of primitives to read

Definition at line 2173 of file FileVTK.cc.

## ◆ loadMeshPoints()

template<typename MeshT >

bool FileVTKPlugin::loadMeshPoints | ( | QString | _spec,
|  | QTextStream & | _in,
|  | MeshT *& | _mesh
| ) |  |
| private

Reads points from the stream and adds them to the mesh.

Parameters

  _spec | Line containing the POINTS header
  _in | Textstream (after reading the POINTS header)
  _mesh | Mesh to work on

Definition at line 1769 of file FileVTK.cc.

## ◆ loadMeshPolygons()

template<typename MeshT >

bool FileVTKPlugin::loadMeshPolygons | ( | QString | _spec,
|  | QTextStream & | _in,
|  | MeshT *& | _mesh,
|  | std::vector< CellType > & | _cells
| ) |  |
| private

Reads polygons from the stream and adds them to the mesh.

Parameters

  _spec | Line containing the POLYGONS header
  _in | Textstream (after reading the POLYGONS header)
  _mesh | Mesh to work on
  _cells | returns cell descriptions

Definition at line 1926 of file FileVTK.cc.

## ◆ loadMeshTriangleStrips()

template<typename MeshT >

bool FileVTKPlugin::loadMeshTriangleStrips | ( | QString | _spec,
|  | QTextStream & | _in,
|  | MeshT *& | _mesh,
|  | std::vector< CellType > & | _cells
| ) |  |
| private

Reads triangle strips from the stream and adds them to the mesh.

Parameters

  _spec | Line containing the TRIANGLE_STRIPS header
  _in | Textstream (after reading the TRIANGLE_STRIPS header)
  _mesh | Mesh to work on
  _cells | returns the Cell descriptions

Definition at line 2075 of file FileVTK.cc.

## ◆ loadObject

int FileVTKPlugin::loadObject | ( | QString | _filename,
|  | DataType | _type
| ) |  |
| slot

load object and force type

load a obj and force mesh datatype

Definition at line 2625 of file FileVTK.cc.

## ◆ loadOptionsWidget()

QWidget * FileVTKPlugin::loadOptionsWidget | ( | QString | _currentFilter | ) |
| virtual

You can provide a special widget showing options for loading your file types depending on the current filter

_currentFilter: one filter from loadFilters

Return 0 when you don't need one

Implements FileInterface.

Definition at line 131 of file FileVTK.cc.

## ◆ name()

QString FileVTKPlugin::name | ( |  | ) |
| inline virtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 176 of file FileVTK.hh.

## ◆ noguiSupported()

void FileVTKPlugin::noguiSupported | ( |  | ) |
| inline private virtual

Using this function you can inform the core that your plugin can run without creating a widget. If your plugin does not implement this function, it will not be loaded in scripting mode without gui. You don't have to do anything in this function.

Reimplemented from BaseInterface.

Definition at line 154 of file FileVTK.hh.

## ◆ removeTemporaryProperties() [1/2]

void FileVTKPlugin::removeTemporaryProperties | ( | TriMesh *& | _mesh | ) |
| private

Removed temporary properties that might have been added during file reading.

Parameters

  _mesh | Mesh whose temporary properties should be removed

Definition at line 486 of file FileVTK.cc.

## ◆ removeTemporaryProperties() [2/2]

void FileVTKPlugin::removeTemporaryProperties | ( | PolyMesh *& | _mesh | ) |
| private

Removed temporary properties that might have been added during file reading.

Parameters

  _mesh | Mesh whose temporary properties should be removed

Definition at line 487 of file FileVTK.cc.

## ◆ removeTemporaryPropertiesOfOpenMesh()

template<typename MeshT >

void FileVTKPlugin::removeTemporaryPropertiesOfOpenMesh | ( | MeshT *& | _mesh | ) |
| private

Removed temporary properties that might have been added during file reading.

Parameters

  _mesh | Mesh whose temporary properties should be removed

Definition at line 282 of file FileVTK.cc.

## ◆ saveOptionsWidget()

QWidget * FileVTKPlugin::saveOptionsWidget | ( | QString | _currentFilter | ) |
| virtual

You can provide a special widget showing options for saving your file types depending on the current filter

_currentFilter: one filter from saveFilters

Return 0 when you don't need one

Implements FileInterface.

Definition at line 137 of file FileVTK.cc.

## ◆ setNormalsOfDuplicatedVertices() [1/2]

void FileVTKPlugin::setNormalsOfDuplicatedVertices | ( | TriMesh *& | _mesh | ) |
| private

Sets normals of duplicated vertices that were created for non-manifold meshes.

Parameters

  _mesh | Mesh to work on

Definition at line 495 of file FileVTK.cc.

## ◆ setNormalsOfDuplicatedVertices() [2/2]

void FileVTKPlugin::setNormalsOfDuplicatedVertices | ( | PolyMesh *& | _mesh | ) |
| private

Sets normals of duplicated vertices that were created for non-manifold meshes.

Parameters

  _mesh | Mesh to work on

Definition at line 496 of file FileVTK.cc.

## ◆ setNormalsOfDuplicatedVerticesOfOpenMesh()

template<typename MeshT >

void FileVTKPlugin::setNormalsOfDuplicatedVerticesOfOpenMesh | ( | MeshT *& | _mesh | ) |
| private

Sets normals of duplicated vertices that were created for non-manifold meshes.

Parameters

  _mesh | Mesh to work on

Definition at line 352 of file FileVTK.cc.

## ◆ supportedType()

DataType FileVTKPlugin::supportedType | ( |  | ) |
| virtual

Return your supported object type( e.g. DATA_TRIANGLE_MESH )

If you support multiple DataTypes you can combine them bitwise here. The function is used from the load and save code to check if your plugin can handle an object of a given dataType.

Implements FileInterface.

Definition at line 113 of file FileVTK.cc.

## ◆ updateFaceNormals() [1/2]

void FileVTKPlugin::updateFaceNormals | ( | TriMesh *& | _mesh | ) |
| private

Updates face normals.

Parameters

  _mesh | Mesh whose face normals should be updated

Definition at line 271 of file FileVTK.cc.

## ◆ updateFaceNormals() [2/2]

void FileVTKPlugin::updateFaceNormals | ( | PolyMesh *& | _mesh | ) |
| private

Updates face normals.

Parameters

  _mesh | Mesh whose face normals should be updated

Definition at line 272 of file FileVTK.cc.

## ◆ updateFaceNormalsOfOpenMesh()

template<typename MeshT >

void FileVTKPlugin::updateFaceNormalsOfOpenMesh | ( | MeshT *& | _mesh | ) |
| private

Updates face normals.

Parameters

  _mesh | Mesh whose face normals should be updated

Definition at line 266 of file FileVTK.cc.

## ◆ updateUserOptions()

void FileVTKPlugin::updateUserOptions | ( |  | ) |
| private

Update user options depending on which options have been selected on the save dialog

Definition at line 2786 of file FileVTK.cc.

## ◆ updateVertexNormals() [1/2]

void FileVTKPlugin::updateVertexNormals | ( | TriMesh *& | _mesh | ) |
| private

Updates vertex normals.

Parameters

  _mesh | Mesh whose vertex normals should be updated

Definition at line 483 of file FileVTK.cc.

## ◆ updateVertexNormals() [2/2]

void FileVTKPlugin::updateVertexNormals | ( | PolyMesh *& | _mesh | ) |
| private

Updates vertex normals.

Parameters

  _mesh | Mesh whose vertex normals should be updated

Definition at line 484 of file FileVTK.cc.

## ◆ updateVertexNormalsOfOpenMesh()

template<typename MeshT >

void FileVTKPlugin::updateVertexNormalsOfOpenMesh | ( | MeshT *& | _mesh | ) |
| private

Updates vertex normals.

Parameters

  _mesh | Mesh whose vertex normals should be updated

Definition at line 276 of file FileVTK.cc.

## ◆ writeASCIIData() [1/2]

bool FileVTKPlugin::writeASCIIData | ( | std::ostream & | _out,
|  | TriMesh & | _mesh
| ) |  |
| private

Writes the data of the VTK file in ASCII format.

Parameters

  _out | Textstream to write the file
  _mesh | Mesh to work on

Definition at line 498 of file FileVTK.cc.

## ◆ writeASCIIData() [2/2]

bool FileVTKPlugin::writeASCIIData | ( | std::ostream & | _out,
|  | PolyMesh & | _mesh
| ) |  |
| private

Writes the data of the VTK file in ASCII format.

Parameters

  _out | Textstream to write the file
  _mesh | Mesh to work on

Definition at line 499 of file FileVTK.cc.

## ◆ writeASCIIDataOfOpenMesh()

template<class MeshT >

bool FileVTKPlugin::writeASCIIDataOfOpenMesh | ( | std::ostream & | _out,
|  | MeshT & | _mesh
| ) |  |
| private

Writes the data of the VTK file in ASCII format.

Parameters

  _out | Textstream to write the file
  _mesh | Mesh to work on

Definition at line 375 of file FileVTK.cc.

## ◆ writeMesh()

template<class MeshT >

bool FileVTKPlugin::writeMesh | ( | std::ostream & | _out,
|  | MeshT & | _mesh
| ) |  |
| private

Writes the header of the VTK file, then calls writeASCIIData (binary VTK is currently unsupported)

Parameters

  _out | Textstream to write the file
  _mesh | Mesh to work on

Definition at line 2763 of file FileVTK.cc.

The documentation for this class was generated from the following files:

- PluginCollection-FilePlugins/Plugin-FileVTK/FileVTK.hh
- PluginCollection-FilePlugins/Plugin-FileVTK/FileVTK.cc