Developer Documentation
MeshComparePlugin Class Reference
Inheritance diagram for MeshComparePlugin:
PythonInterface RPCInterface TextureInterface BackupInterface ScriptInterface LoggingInterface ToolboxInterface BaseInterface

Public Slots

QString version ()
 

Signals

void updateView ()
 
void updatedObject (int _id, const UpdateType &_type)
 
void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 
void createBackup (int _id, QString _name, UpdateType _type=UPDATE_ALL)
 
void pluginExists (QString _pluginName, bool &_exists)
 
- 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 ToolboxInterface
virtual void addToolbox (QString _name, QWidget *_widget)
 Add a toolbox widget to the gui with the given name. 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 executeFileScript (QString _filename)
 
virtual void getAvailableFunctions (QStringList &_functions)
 
- Signals inherited from BackupInterface
virtual void createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
 Tell Backup Plugin to create a backup. More...
 
virtual void aboutToRestore (int _objectid)
 Backup Plugin tells other Plugins that a restore will happen. More...
 
virtual void generateBackup (int _id, QString _name, UpdateType _type)
 This signal is emitted by a BackupPlugin and tells a TypePlugin to generate a backup. More...
 
- 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...
 
- Signals inherited from RPCInterface
virtual void pluginExists (QString _pluginName, bool &_exists)
 
- Signals inherited from PythonInterface
virtual void executePythonScript (QString _script)
 

Public Member Functions

QString name ()
 Return a name for the plugin. More...
 
QString description ()
 Return a description of what the plugin is doing. More...
 
bool eventFilter (QObject *obj, QEvent *event) override
 
void compare (int _sourceId, int _targetId, bool _computeDist=true, bool _computeNormal=true, bool _computeGauss=true, bool _computeMean=true, bool _selection_=false)
 
double lastMaximalDistance ()
 Get the maximal distance of the last comparison (-1, if no comparison performed so far) More...
 
double lastMaximalNormalDeviation ()
 Get the maximal normal deviation of the last comparison in degree (-1, if no comparison performed so far) More...
 
double lastMaximalMeanCurvatureDeviation ()
 Get the maximal mean curvature deviation of the last comparison (-1, if no comparison performed so far) More...
 
double lastMaximalGaussCurvatureDeviation ()
 Get the maximal gauss curvature deviation of the last comparison (-1, if no comparison performed so far) More...
 

Private Slots

void initializePlugin ()
 
void pluginsInitialized ()
 
void compareButton ()
 Triggers comparison of the selected meshes. More...
 
void slotClear ()
 Clears the visualization. More...
 
void slotObjectUpdated (int _identifier, const UpdateType &_type)
 Called when an object gets updated. More...
 
void noguiSupported ()
 
void slotClampBox (bool _checked)
 If the checkbox is changed to be checked, the values in the labels will be written into the spin boxes. More...
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin. More...
 

Private Member Functions

void visualizeData (const std::vector< double > &_data, double _maxValue, ACG::SceneGraph::PointNode *_pnode)
 Visualize data. More...
 
- Private Member Functions inherited from BaseInterface
virtual void noguiSupported ()
 
virtual ~BaseInterface ()
 Destructor. More...
 
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 ToolboxInterface
virtual ~ToolboxInterface ()
 Destructor. More...
 
virtual void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 Add a toolbox widget to the gui with the given name and an icon. More...
 
virtual void addToolbox (QString _name, QWidget *_widget, QIcon *_icon, QWidget *_headerAreaWidget)
 Add a toolbox widget to the gui with the given name, icon and header area widget. More...
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor. More...
 
- Private Member Functions inherited from ScriptInterface
virtual ~ScriptInterface ()
 Destructor. More...
 
virtual void showScriptInEditor (QString _filename)
 
virtual void executeScript (QString _script)
 
virtual void getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
 
- Private Member Functions inherited from BackupInterface
virtual void createBackup (IdList _objectids, QString _name, std::vector< UpdateType > _types)
 Tell Backup Plugin to create a group backup. More...
 
virtual void undo (int _objectid)
 Tell Backup Plugin to undo the last action of an object. More...
 
virtual void redo (int _objectid)
 Tell Backup Plugin to redo the last action on an object. More...
 
virtual void undo ()
 Tell Backup Plugin to undo the last action. More...
 
virtual void redo ()
 Tell Backup Plugin to redo the last action. More...
 
virtual ~BackupInterface ()
 Destructor. More...
 
virtual void restored (int _objectid)
 Backup Plugin tells other Plugins that a restore has happened. More...
 
- 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.
. More...
 
virtual void updateAllTextures ()
 Tell Plugins to update all textures. More...
 
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.
More...
 
virtual void switchTexture (QString _textureName)
 emit this signal if you want to switch the global texture This signal can be called from any thread.
More...
 
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. More...
 
- Private Member Functions inherited from RPCInterface
virtual ~RPCInterface ()
 Destructor. More...
 
virtual void functionExists (QString _pluginName, QString _functionName, bool &_exists)
 
- Private Member Functions inherited from PythonInterface
virtual void openPythonScriptInEditor (QString _script)
 
virtual ~PythonInterface ()
 Destructor. More...
 

Private Attributes

MeshCompareToolbarWidgettool_
 The toolbar widget of this plugin. More...
 
QIcon * toolIcon_
 Icon for the toolbar. More...
 
double maximalDistance_
 Last maximal computed distance. More...
 
double maxNormalDeviation_
 Last maximal computed normal deviation in degree. More...
 
double maxMeanCurvatureDev_
 Last maximal mean curvature deviation. More...
 
double maxGaussCurvatureDev_
 Last maximal gauss curvature deviation. More...
 
QChartsPlotplot_
 

Detailed Description

Definition at line 66 of file MeshComparePlugin.hh.

Constructor & Destructor Documentation

◆ MeshComparePlugin()

MeshComparePlugin::MeshComparePlugin ( )

Definition at line 60 of file MeshComparePlugin.cc.

◆ ~MeshComparePlugin()

MeshComparePlugin::~MeshComparePlugin ( )

Definition at line 72 of file MeshComparePlugin.cc.

Member Function Documentation

◆ compare()

void MeshComparePlugin::compare ( int  _sourceId,
int  _targetId,
bool  _computeDist = true,
bool  _computeNormal = true,
bool  _computeGauss = true,
bool  _computeMean = true,
bool  _selection_ = false 
)

Compares two meshes. Use the two getter functions to retrieve the maximal deviations.

The source will be the reference. The difference will be rendered as points on the target mesh.

Parameters
_sourceIdId of the reference mesh
_targetIdId of the mesh that should be compared to the reference mesh.
_computeDistCompute distance between meshes
_computeNormalCompute normal deviation between meshes
_computeGaussCompute gauss curvature deviation between meshes
_computeMeanCompute mean curvature deviation between meshes
_selectionCompare only selected vertices

Definition at line 223 of file MeshComparePlugin.cc.

◆ compareButton

void MeshComparePlugin::compareButton ( )
privateslot

Triggers comparison of the selected meshes.

Definition at line 141 of file MeshComparePlugin.cc.

◆ description()

QString MeshComparePlugin::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 107 of file MeshComparePlugin.hh.

◆ eventFilter()

bool MeshComparePlugin::eventFilter ( QObject *  obj,
QEvent *  event 
)
override

Definition at line 99 of file MeshComparePlugin.cc.

◆ initializePlugin

void MeshComparePlugin::initializePlugin ( )
privateslot

Definition at line 77 of file MeshComparePlugin.cc.

◆ lastMaximalDistance()

double MeshComparePlugin::lastMaximalDistance ( )
inline

Get the maximal distance of the last comparison (-1, if no comparison performed so far)

Definition at line 151 of file MeshComparePlugin.hh.

◆ lastMaximalGaussCurvatureDeviation()

double MeshComparePlugin::lastMaximalGaussCurvatureDeviation ( )
inline

Get the maximal gauss curvature deviation of the last comparison (-1, if no comparison performed so far)

Definition at line 160 of file MeshComparePlugin.hh.

◆ lastMaximalMeanCurvatureDeviation()

double MeshComparePlugin::lastMaximalMeanCurvatureDeviation ( )
inline

Get the maximal mean curvature deviation of the last comparison (-1, if no comparison performed so far)

Definition at line 157 of file MeshComparePlugin.hh.

◆ lastMaximalNormalDeviation()

double MeshComparePlugin::lastMaximalNormalDeviation ( )
inline

Get the maximal normal deviation of the last comparison in degree (-1, if no comparison performed so far)

Definition at line 154 of file MeshComparePlugin.hh.

◆ name()

QString MeshComparePlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 106 of file MeshComparePlugin.hh.

◆ noguiSupported

void MeshComparePlugin::noguiSupported ( )
inlineprivateslot

Definition at line 124 of file MeshComparePlugin.hh.

◆ pluginsInitialized

void MeshComparePlugin::pluginsInitialized ( )
privateslot

Definition at line 106 of file MeshComparePlugin.cc.

◆ slotClampBox

void MeshComparePlugin::slotClampBox ( bool  _checked)
privateslot

If the checkbox is changed to be checked, the values in the labels will be written into the spin boxes.

Definition at line 216 of file MeshComparePlugin.cc.

◆ slotClear

void MeshComparePlugin::slotClear ( )
privateslot

Clears the visualization.

Definition at line 202 of file MeshComparePlugin.cc.

◆ slotObjectUpdated

void MeshComparePlugin::slotObjectUpdated ( int  _identifier,
const UpdateType _type 
)
privateslot

Called when an object gets updated.

Definition at line 188 of file MeshComparePlugin.cc.

◆ version

QString MeshComparePlugin::version ( )
inlineslot

Definition at line 129 of file MeshComparePlugin.hh.

◆ visualizeData()

void MeshComparePlugin::visualizeData ( const std::vector< double > &  _data,
double  _maxValue,
ACG::SceneGraph::PointNode _pnode 
)
private

Visualize data.

This function visualizes the data via rendering points and pushes it to the histogram.

Parameters
_dataVector of data points
_maxValueMaximal value found in the data
_pnodeThe point node that will be used to visualize the data

Definition at line 442 of file MeshComparePlugin.cc.

Member Data Documentation

◆ maxGaussCurvatureDev_

double MeshComparePlugin::maxGaussCurvatureDev_
private

Last maximal gauss curvature deviation.

Definition at line 196 of file MeshComparePlugin.hh.

◆ maximalDistance_

double MeshComparePlugin::maximalDistance_
private

Last maximal computed distance.

Definition at line 187 of file MeshComparePlugin.hh.

◆ maxMeanCurvatureDev_

double MeshComparePlugin::maxMeanCurvatureDev_
private

Last maximal mean curvature deviation.

Definition at line 193 of file MeshComparePlugin.hh.

◆ maxNormalDeviation_

double MeshComparePlugin::maxNormalDeviation_
private

Last maximal computed normal deviation in degree.

Definition at line 190 of file MeshComparePlugin.hh.

◆ plot_

QChartsPlot* MeshComparePlugin::plot_
private

Definition at line 198 of file MeshComparePlugin.hh.

◆ tool_

MeshCompareToolbarWidget* MeshComparePlugin::tool_
private

The toolbar widget of this plugin.

Definition at line 181 of file MeshComparePlugin.hh.

◆ toolIcon_

QIcon* MeshComparePlugin::toolIcon_
private

Icon for the toolbar.

Definition at line 184 of file MeshComparePlugin.hh.


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