Commit 33a57be5 authored by Jan Möbius's avatar Jan Möbius
Browse files

Improved names of function, tried to remove some more warnings

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@18176 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6d16851c
......@@ -133,6 +133,7 @@ class ComponentsPlugin : public QObject, BaseInterface, MouseInterface, PickingI
//===========================================================================
private slots:
/// Split into Components Button was hit
void slotSplitComponentsButton();
......@@ -155,15 +156,36 @@ class ComponentsPlugin : public QObject, BaseInterface, MouseInterface, PickingI
* @{ */
//===========================================================================
/// Split mesh into components
/** \brief Split mesh into components
*
* This function will split an arbitrary component out of a mesh.
* It takes a copy of the original mesh.
*
* @param _mesh the original mesh
* @param _copy original mesh copy with identical topology and geometry
* the copy will contain one component of the original mesh.
*/
template< class MeshT >
void splitComponent( MeshT* _mesh, MeshT* _copy);
/** \brief Select the biggest component of the mesh
*
* This function will select the component of the mesh which has the most faces
*
* @param _mesh the mesh to work on
*/
template< class MeshT >
void selectBiggestComponent( MeshT* _mesh);
/** \brief Deletes all faces of a mesh that are not selected
*
* Use selectBiggestcomponent first to select the biggest component.
* Than use this function to remove all other parts of the mesh.
*
* @param _mesh the mesh to work on
*/
template< class MeshT >
void isolateBiggestComponent( MeshT* _mesh);
void deleteUnselectedFaces( MeshT* _mesh);
/** @} */
......@@ -192,11 +214,11 @@ class ComponentsPlugin : public QObject, BaseInterface, MouseInterface, PickingI
*/
void biggestComponent(int _objId);
/** @} */
public slots:
QString version() { return QString("1.0"); };
/** @} */
private:
/// set scripting slot descriptions
void setDescriptions();
......
......@@ -50,15 +50,7 @@
//------------------------------------------------------------------------------
/** \brief Split mesh into components
*
* This function will split an arbitrary component out of a mesh.
* It takes a copy of the original mesh.
*
* @param _mesh the original mesh
* @param _copy original mesh copy with identical topology and geometry
* the copy will contain one component of the original mesh.
*/
template< class MeshT >
void
ComponentsPlugin::splitComponent( MeshT* _mesh, MeshT* _copy){
......@@ -173,7 +165,7 @@ ComponentsPlugin::selectBiggestComponent( MeshT* _mesh){
template< class MeshT >
void
ComponentsPlugin::isolateBiggestComponent( MeshT* _mesh)
ComponentsPlugin::deleteUnselectedFaces( MeshT* _mesh)
{
for (typename MeshT::FaceIter fIter = _mesh->faces_begin(); fIter != _mesh->faces_end(); ++fIter)
{
......
......@@ -221,11 +221,11 @@ void ComponentsPlugin::biggestComponent(int _objId)
if ( obj->dataType(DATA_TRIANGLE_MESH) )
{
selectBiggestComponent(PluginFunctions::triMesh(obj));
isolateBiggestComponent(PluginFunctions::triMesh(obj));
deleteUnselectedFaces(PluginFunctions::triMesh(obj));
}
else if ( obj->dataType(DATA_POLY_MESH) )
{
selectBiggestComponent(PluginFunctions::polyMesh(obj));
isolateBiggestComponent(PluginFunctions::polyMesh(obj));
deleteUnselectedFaces(PluginFunctions::polyMesh(obj));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment