Developer Documentation
FileVTKPlugin Class Reference
Inheritance diagram for FileVTKPlugin:
TextureInterface RPCInterface StatusbarInterface INIInterface ScriptInterface LoggingInterface LoadSaveInterface FileInterface BaseInterface

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, std::vector< quint32 > _indices)
 Adds a tetra cell to the mesh. (Does nothing, yet) More...
 
int addTetraCell (PolyMesh *&_mesh, std::vector< quint32 > _indices)
 Adds a tetra cell to the mesh. (Does nothing, yet) More...
 
int addHexaCell (TriMesh *&_mesh, std::vector< quint32 > _indices)
 Adds a hexa cell to the mesh. (Does nothing, yet) More...
 
int addHexaCell (PolyMesh *&_mesh, std::vector< quint32 > _indices)
 Adds a hexa cell to the mesh. (Does nothing, yet) More...
 
int addWedgeCell (TriMesh *&_mesh, std::vector< quint32 > _indices)
 Adds a wedge cell to the mesh. (Does nothing, yet) More...
 
int addWedgeCell (PolyMesh *&_mesh, std::vector< quint32 > _indices)
 Adds a wedge cell to the mesh. (Does nothing, yet) More...
 
int addPyramidCell (TriMesh *&_mesh, std::vector< quint32 > _indices)
 Adds a pyramid cell to the mesh. (Does nothing, yet) More...
 
int addPyramidCell (PolyMesh *&_mesh, std::vector< quint32 > _indices)
 Adds a pyramid cell to the mesh. (Does nothing, yet) More...
 
int addFace (TriMesh *&_mesh, std::vector< quint32 > _indices)
 Adds a face to the mesh. More...
 
int addFace (PolyMesh *&_mesh, 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, QString _filename, uint _dimension)
 Emit this Signal if a texture has been added (Property Name,filename,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 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 88 of file FileVTK.hh.

Member Function Documentation

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
_meshMesh to work on
_vhandlesNon-manifold face to be added
Returns
idx of first added face

Definition at line 2018 of file FileVTK.cc.

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
_meshMesh to work on
_cellDescription of the cell including its type and its index in the mesh
_normalThe normal

Definition at line 316 of file FileVTK.cc.

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

Adds a face to the mesh.

Parameters
_meshMesh the face is added to
_indicesIndices of the vertices of the face, counter clockwise order
Returns
index of the first added primitive

Definition at line 484 of file FileVTK.cc.

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

Adds a face to the mesh.

Parameters
_meshMesh the face is added to
_indicesIndices of the vertices of the face, counter clockwise order
Returns
index of the first added primitive

Definition at line 485 of file FileVTK.cc.

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

Adds a face to the mesh.

Parameters
_meshMesh the face is added to
_index1First index of the vertices of the face, counter clockwise order
_index2Second index of the vertices of the face, counter clockwise order
_index3Third index of the vertices of the face, counter clockwise order
Returns
index of the first added primitive

Definition at line 487 of file FileVTK.cc.

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

Adds a face to the mesh.

Parameters
_meshMesh the face is added to
_index1First index of the vertices of the face, counter clockwise order
_index2Second index of the vertices of the face, counter clockwise order
_index3Third index of the vertices of the face, counter clockwise order
Returns
index of the first added primitive

Definition at line 488 of file FileVTK.cc.

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

Adds a face normal.

Parameters
_meshMesh the face normal is added to
_indexIndex of the face
_normalNormal that is added

Definition at line 499 of file FileVTK.cc.

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

Adds a face normal.

Parameters
_meshMesh the face normal is added to
_indexIndex of the face
_normalNormal that is added

Definition at line 500 of file FileVTK.cc.

template<typename MeshT >
void FileVTKPlugin::addFaceNormalToOpenMesh ( MeshT  _mesh,
quint32  _index,
OpenMesh::Vec3d  _normal 
)
private

Adds a face normal.

Parameters
_meshMesh the face normal is added to
_indexIndex of the face
_normalNormal that is added

Definition at line 308 of file FileVTK.cc.

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

Adds a face to the mesh.

Parameters
_meshMesh the face is added to
_indicesIndices of the vertices of the face, counter clockwise order
Returns
index of the first added primitive

Definition at line 239 of file FileVTK.cc.

template<typename MeshT >
int FileVTKPlugin::addFaceToOpenMesh ( MeshT *&  _mesh,
quint32  _index1,
quint32  _index2,
quint32  _index3 
)
private

Adds a face to the mesh.

Parameters
_meshMesh the face is added to
_index1First index of the vertices of the face, counter clockwise order
_index2Second index of the vertices of the face, counter clockwise order
_index3Third index of the vertices of the face, counter clockwise order
Returns
index of the first added primitive

Definition at line 264 of file FileVTK.cc.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices 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.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices of the vertices of the cell, ordered according to vtk standard
Returns
index of the first added primitive

Definition at line 476 of file FileVTK.cc.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices 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.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices of the vertices of the cell, ordered according to vtk standard
Returns
index of the first added primitive

Definition at line 481 of file FileVTK.cc.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices of the vertices of the cell, ordered according to vtk standard
Returns
index of the first added primitive

Definition at line 482 of file FileVTK.cc.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices of the vertices of the cell, ordered according to vtk standard
Returns
index of the first added primitive

Definition at line 232 of file FileVTK.cc.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices 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.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices of the vertices of the cell, ordered according to vtk standard
Returns
index of the first added primitive

Definition at line 473 of file FileVTK.cc.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices 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.

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

Adds a vertex normal.

Parameters
_meshMesh the vertex normal is added to
_indexIndex of the vertex
_normalNormal that is added

Definition at line 496 of file FileVTK.cc.

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

Adds a vertex normal.

Parameters
_meshMesh the vertex normal is added to
_indexIndex of the vertex
_normalNormal that is added

Definition at line 497 of file FileVTK.cc.

template<typename MeshT >
void FileVTKPlugin::addVertexNormalToOpenMesh ( MeshT  _mesh,
quint32  _index,
OpenMesh::Vec3d  _normal 
)
private

Adds a vertex normal.

Parameters
_meshMesh the vertex normal is added to
_indexIndex of the vertex
_normalNormal that is added

Definition at line 299 of file FileVTK.cc.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices of the vertices of the cell, ordered according to vtk standard
Returns
index of the first added primitive

Definition at line 478 of file FileVTK.cc.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices of the vertices of the cell, ordered according to vtk standard
Returns
index of the first added primitive

Definition at line 479 of file FileVTK.cc.

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

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

Parameters
_meshMesh the cell is added to
_indicesIndices 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.

QString FileVTKPlugin::description ( )
inlinevirtual

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 185 of file FileVTK.hh.

QString FileVTKPlugin::getLoadFilters ( )
virtual

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

Implements FileInterface.

Definition at line 108 of file FileVTK.cc.

QString FileVTKPlugin::getSaveFilters ( )
virtual

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

Implements FileInterface.

Definition at line 114 of file FileVTK.cc.

void FileVTKPlugin::initializePlugin ( )
privatevirtual

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 94 of file FileVTK.cc.

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
_specLine containing the CELL header
_inTextstream (after reading the CELL header)
_meshMesh to work on
_cellsCell descriptions

Definition at line 2246 of file FileVTK.cc.

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
_specLine containing the LINES header
_inTextstream (after reading the LINES header)
_meshMesh to work on

Definition at line 1845 of file FileVTK.cc.

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
_specLine containing the NORMALS header
_inTextstream (after reading the NORMALS header)
_meshMesh to work on
_cellsCell descriptions
_pointNormalpoint or face normals?
_countNumber of primitives to read

Definition at line 2171 of file FileVTK.cc.

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
_specLine containing the POINTS header
_inTextstream (after reading the POINTS header)
_meshMesh to work on

Definition at line 1767 of file FileVTK.cc.

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
_specLine containing the POLYGONS header
_inTextstream (after reading the POLYGONS header)
_meshMesh to work on
_cellsreturns cell descriptions

Definition at line 1924 of file FileVTK.cc.

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
_specLine containing the TRIANGLE_STRIPS header
_inTextstream (after reading the TRIANGLE_STRIPS header)
_meshMesh to work on
_cellsreturns the Cell descriptions

Definition at line 2073 of file FileVTK.cc.

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

load object and force type

load a obj and force mesh datatype

Definition at line 2623 of file FileVTK.cc.

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 138 of file FileVTK.cc.

QString FileVTKPlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 184 of file FileVTK.hh.

void FileVTKPlugin::noguiSupported ( )
inlineprivatevirtual

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 162 of file FileVTK.hh.

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

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

Parameters
_meshMesh whose temporary properties should be removed

Definition at line 493 of file FileVTK.cc.

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

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

Parameters
_meshMesh whose temporary properties should be removed

Definition at line 494 of file FileVTK.cc.

template<typename MeshT >
void FileVTKPlugin::removeTemporaryPropertiesOfOpenMesh ( MeshT *&  _mesh)
private

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

Parameters
_meshMesh whose temporary properties should be removed

Definition at line 289 of file FileVTK.cc.

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 144 of file FileVTK.cc.

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

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

Parameters
_meshMesh to work on

Definition at line 502 of file FileVTK.cc.

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

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

Parameters
_meshMesh to work on

Definition at line 503 of file FileVTK.cc.

template<typename MeshT >
void FileVTKPlugin::setNormalsOfDuplicatedVerticesOfOpenMesh ( MeshT *&  _mesh)
private

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

Parameters
_meshMesh to work on

Definition at line 359 of file FileVTK.cc.

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 120 of file FileVTK.cc.

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

Updates face normals.

Parameters
_meshMesh whose face normals should be updated

Definition at line 278 of file FileVTK.cc.

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

Updates face normals.

Parameters
_meshMesh whose face normals should be updated

Definition at line 279 of file FileVTK.cc.

template<typename MeshT >
void FileVTKPlugin::updateFaceNormalsOfOpenMesh ( MeshT *&  _mesh)
private

Updates face normals.

Parameters
_meshMesh whose face normals should be updated

Definition at line 273 of file FileVTK.cc.

void FileVTKPlugin::updateUserOptions ( )
private

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

Definition at line 2784 of file FileVTK.cc.

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

Updates vertex normals.

Parameters
_meshMesh whose vertex normals should be updated

Definition at line 490 of file FileVTK.cc.

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

Updates vertex normals.

Parameters
_meshMesh whose vertex normals should be updated

Definition at line 491 of file FileVTK.cc.

template<typename MeshT >
void FileVTKPlugin::updateVertexNormalsOfOpenMesh ( MeshT *&  _mesh)
private

Updates vertex normals.

Parameters
_meshMesh whose vertex normals should be updated

Definition at line 283 of file FileVTK.cc.

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

Writes the data of the VTK file in ASCII format.

Parameters
_outTextstream to write the file
_meshMesh to work on

Definition at line 505 of file FileVTK.cc.

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

Writes the data of the VTK file in ASCII format.

Parameters
_outTextstream to write the file
_meshMesh to work on

Definition at line 506 of file FileVTK.cc.

template<class MeshT >
bool FileVTKPlugin::writeASCIIDataOfOpenMesh ( std::ostream &  _out,
MeshT &  _mesh 
)
private

Writes the data of the VTK file in ASCII format.

Parameters
_outTextstream to write the file
_meshMesh to work on

Definition at line 382 of file FileVTK.cc.

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
_outTextstream to write the file
_meshMesh to work on

Definition at line 2761 of file FileVTK.cc.


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