Cleaned plugins interface; changed useless help class into a plain string

This commit is contained in:
Paolo Cignoni cignoni 2006-11-29 00:59:21 +00:00
parent db50fef49f
commit ff3ee8b8ac
22 changed files with 175 additions and 303 deletions

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.49 2006/11/29 00:55:36 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.48 2006/11/07 14:56:23 zifnab1974
Changes for compilation with gcc 3.4.6 on linux AMD64
@ -36,149 +39,16 @@ Restructured plugins interface for simplifying the server
Revision 1.45 2006/06/15 13:05:57 cignoni
added Filter History Dialogs
Revision 1.44 2006/06/06 14:32:38 zifnab1974
Linux filenames are case-sensitive
Revision 1.43 2006/05/25 09:46:37 cignoni
missing std and and all the other gcc detected syntax errors
Revision 1.42 2006/05/25 04:57:45 cignoni
Major 0.7 release. A lot of things changed. Colorize interface gone away, Editing and selection start to work.
Optional data really working. Clustering decimation totally rewrote. History start to work. Filters organized in classes.
Revision 1.41 2006/04/18 06:57:34 zifnab1974
syntax errors for gcc 3.4.5 resolved
Revision 1.40 2006/04/12 15:12:18 cignoni
Added Filter classes (cleaning, meshing etc)
Revision 1.39 2006/02/21 17:25:57 ggangemi
RenderMode is now passed to MeshRenderInterface::Init()
Revision 1.38 2006/02/21 15:59:06 ggangemi
added info() method in meshrender plugin
Revision 1.37 2006/02/16 19:29:14 fmazzant
transfer of Export_3ds.h, Export_obj.h, Io_3ds_obj_material.h from Meshlab to vcg
Revision 1.36 2006/02/15 23:09:06 fmazzant
added the part of MeshIO credits
Revision 1.35 2006/01/19 17:07:51 fmazzant
changed struct Format to class Format(QString, QString).
updated importFormats() and exportFormats() to the new class.
Revision 1.34 2006/01/19 15:58:59 fmazzant
moved savemaskexporter to mainwindows
Revision 1.33 2006/01/17 13:47:45 fmazzant
update interface meshio : formats -> importFormats() & exportFormts
Revision 1.32 2006/01/17 10:04:20 cignoni
Slightly change MeshEditInterface
Revision 1.31 2006/01/13 12:10:30 vannini
Added logging to mean and gaussian curvautres colorization
Revision 1.30 2006/01/04 15:27:30 alemochi
Renamed property of Format struct, and changed plugin dialog
Revision 1.29 2005/12/30 10:51:10 mariolatronico
- added GLLogStream forward declaration
- added method setLog to MeshFilterInterface to remove GLArea dependency on meshfilter plugin
Revision 1.28 2005/12/24 04:16:12 ggangemi
removed "const" from RenderInterface Actions() method
Revision 1.27 2005/12/15 01:15:07 buzzelli
minor changes into MeshIOInterface
Revision 1.26 2005/12/14 22:24:14 cignoni
Added preliminary supprot for editing/selection plugins.
Revision 1.25 2005/12/12 22:46:05 cignoni
Cleaned up and added info functions
Revision 1.24 2005/12/09 00:26:25 buzzelli
io importing mechanism adapted in order to be fully transparent towards the user
Revision 1.23 2005/12/07 08:01:09 fmazzant
exporter obj temporany
Revision 1.22 2005/12/05 18:08:21 ggangemi
added MeshRenderInterface::isSupported() method
Revision 1.21 2005/12/05 12:17:09 ggangemi
Added MeshDecorateInterface
Revision 1.20 2005/12/05 11:38:52 ggangemi
workaround: added RenderMode parameter to MeshColorizePlugin::compute
Revision 1.19 2005/12/03 23:50:15 cignoni
changed io interface to return a list instead of a vector
Revision 1.18 2005/12/03 16:05:18 glvertex
solved some compatilbility issues
Revision 1.17 2005/12/02 17:39:07 glvertex
modified plugin import code. old plugins have been disabled cause of new interface.
Revision 1.16 2005/11/30 16:26:56 cignoni
All the modification, restructuring seen during the 30/12 lesson...
Revision 1.15 2005/11/28 15:36:41 mariolatronico
changed again interface on MeshIO (filename not const on save / open)
Revision 1.14 2005/11/28 15:21:07 mariolatronico
added const on various methods to comply C++ standard on reference variable
Revision 1.13 2005/11/27 18:36:58 buzzelli
changed applyImportExport method in order to handle correctly the case of no opened subwindows
Revision 1.12 2005/11/26 23:57:04 cignoni
made io filters to appear into file menu.
Revision 1.11 2005/11/26 23:29:08 cignoni
Commented out names of unused parameters to remove boring warnings
Revision 1.10 2005/11/25 21:57:51 mariolatronico
changed signature of MeshColorizeInterface::Compute to allow gcc compilation
Revision 1.9 2005/11/25 19:29:01 buzzelli
small changes to signature of MeshIOInterface methods
Revision 1.8 2005/11/25 00:10:08 glvertex
added Q_DECLARE_INTERFACE for MeshColorizeInterface
Revision 1.7 2005/11/24 10:54:37 cignoni
Yet another test to compile under linux: added a const before QString in applyfilter...
Revision 1.6 2005/11/24 01:38:36 cignoni
Added new plugins intefaces, tested with shownormal render mode
Revision 1.5 2005/11/23 00:25:06 glvertex
Reverted plugin interface to prev version
Revision 1.4 2005/11/22 17:10:53 glvertex
MeshFilter Plugin STRONGLY reviewed and changed
Revision 1.3 2005/11/21 12:07:56 cignoni
Added copyright info
****************************************************************************/
#ifndef MESHLAB_INTERFACES_H
#define MESHLAB_INTERFACES_H
#include <QtCore>
#include <QMap>
#include <QPair>
#include <QAction>
#include "filterparameter.h"
class QWidget;
class QGLWidget;
class QIcon;
class QString;
class QVariant;
class QMouseEvent;
@ -187,13 +57,6 @@ class RenderMode;
class GLArea;
class GLLogStream;
class ActionInfo
{
public:
QString Help;
QString ShortHelp;
};
class PluginInfo
{
public:
@ -213,27 +76,26 @@ public:
QStringList extensions;
};
virtual ~MeshIOInterface() {}
virtual const ActionInfo &Info(QAction *)=0;
virtual const PluginInfo &Info()=0;
virtual ~MeshIOInterface() {}
virtual const PluginInfo &Info()=0;
virtual QList<Format> importFormats() const = 0;
virtual QList<Format> exportFormats() const = 0;
virtual int GetExportMaskCapability(QString &format) const = 0;
virtual bool open(
const QString &format, // "OBJ"
virtual bool open(
const QString &format, // the extension of the format e.g. "PLY"
QString &fileName,
MeshModel &m,
int &mask,
int &mask, // what kind of data are found in the file (per vertex color, texture coords etc)
vcg::CallBackPos *cb=0,
QWidget *parent=0)=0;
virtual bool save(
const QString &format, // "OBJ"
const QString &format, // the extension of the format e.g. "PLY"
QString &fileName,
MeshModel &m,
const int &mask,
const int &mask, // what kind of data are saved
vcg::CallBackPos *cb=0,
QWidget *parent= 0)=0 ; // prima istanza il dialogo di opzioni viene sempre.
};
@ -245,7 +107,7 @@ public:
typedef int FilterType;
enum FilterClass { Generic, Selection, Cleaning, Remeshing, FaceColoring, VertexColoring} ;
virtual ~MeshFilterInterface() {}
virtual const ActionInfo &Info(QAction *)=0;
virtual const QString Info(QAction *)=0;
// The filterclass describe in which submenu each filter should be placed
virtual const FilterClass getClass(QAction *) {return MeshFilterInterface::Generic;};
@ -256,7 +118,7 @@ public:
// The filters can require some additional
virtual const int getRequirements(QAction *){return MeshModel::MM_NONE;}
// The main function that apply the selected filter
// The main function that applies the selected filter
virtual bool applyFilter(QAction * /*filter*/, MeshModel &/*m*/, FilterParameter & /*parent*/, vcg::CallBackPos * /*cb*/) = 0;
virtual const PluginInfo &Info()=0;
@ -310,7 +172,7 @@ public:
virtual ~MeshDecorateInterface() {}
virtual const ActionInfo &Info(QAction *)=0;
virtual const QString Info(QAction *)=0;
virtual const PluginInfo &Info()=0;
virtual void Init(QAction * /*mode*/, MeshModel &/*m*/, GLArea * /*parent*/){};
@ -341,7 +203,7 @@ class MeshEditInterface
public:
virtual ~MeshEditInterface() {}
virtual const ActionInfo &Info(QAction *)=0;
virtual const QString Info(QAction *)=0;
virtual const PluginInfo &Info()=0;
virtual void StartEdit(QAction * /*mode*/, MeshModel &/*m*/, GLArea * /*parent*/){};

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.13 2006/11/29 00:55:36 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.12 2006/05/25 04:57:45 cignoni
Major 0.7 release. A lot of things changed. Colorize interface gone away, Editing and selection start to work.
Optional data really working. Clustering decimation totally rewrote. History start to work. Filters organized in classes.
@ -229,14 +232,14 @@ void PluginDialog::displayInfo(QTreeWidgetItem* item,int ncolumn)
{
if (item->parent()==NULL) labelInfo->setText(QString("Author: ")+iDecorate->Info().Author+QString(" Date: ")+iDecorate->Info().Date+QString(" Version: ")+iDecorate->Info().Version);
else foreach(QAction *a,iDecorate->actions())
if (actionName==a->text()) labelInfo->setText(iDecorate->Info(a).Help);
if (actionName==a->text()) labelInfo->setText(iDecorate->Info(a));
}
MeshFilterInterface *iFilter = qobject_cast<MeshFilterInterface *>(plugin);
if (iFilter)
{
if (item->parent()==NULL) labelInfo->setText(QString("Author: ")+iFilter->Info().Author+QString(" Date: ")+iFilter->Info().Date+QString(" Version: ")+iFilter->Info().Version);
else foreach(QAction *a,iFilter->actions())
if (actionName==a->text()) labelInfo->setText(iFilter->Info(a).Help);
if (actionName==a->text()) labelInfo->setText(iFilter->Info(a));
}
MeshRenderInterface *iRender = qobject_cast<MeshRenderInterface *>(plugin);
if (iRender){
@ -246,7 +249,7 @@ void PluginDialog::displayInfo(QTreeWidgetItem* item,int ncolumn)
{
if (item->parent()==NULL) labelInfo->setText(QString("Author: ")+iEdit->Info().Author+QString(" Date: ")+iEdit->Info().Date+QString(" Version: ")+iEdit->Info().Version);
else foreach(QAction *a,iEdit->actions())
if (actionName==a->text()) labelInfo->setText(iEdit->Info(a).Help);
if (actionName==a->text()) labelInfo->setText(iEdit->Info(a));
}
}
}

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.5 2006/11/29 00:59:15 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.4 2006/11/27 06:57:19 cignoni
Wrong way of using the __DATE__ preprocessor symbol
@ -181,17 +184,15 @@ const CleanFilter::FilterClass CleanFilter::getClass(QAction *a)
}
}
const ActionInfo &CleanFilter::Info(QAction *action)
const QString CleanFilter::Info(QAction *action)
{
static ActionInfo ai;
switch(ID(action))
{
case FP_REBUILD_SURFACE : ai.Help = tr("Merge"); break;
case FP_REMOVE_ISOLATED_COMPLEXITY: ai.Help = tr("Remove Isolated"); break;
case FP_REMOVE_ISOLATED_DIAMETER: ai.Help = tr("Remove Isolated"); break;
case FP_REMOVE_WRT_Q: ai.Help = tr("Remove all the faces with quality lower than..."); break;
case FP_REBUILD_SURFACE : return QString("Merge");
case FP_REMOVE_ISOLATED_COMPLEXITY: return tr("Remove Isolated");
case FP_REMOVE_ISOLATED_DIAMETER: return tr("Remove Isolated");
case FP_REMOVE_WRT_Q: return tr("Remove all the faces with quality lower than...");
}
return ai;
}
const PluginInfo &CleanFilter::Info()

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.2 2006/11/29 00:59:15 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.1 2006/11/07 09:09:27 cignoni
First Working release, moved in from epoch svn
@ -63,7 +66,7 @@ class CleanFilter : public QObject, public MeshFilterInterface
CleanFilter();
~CleanFilter();
virtual const QString ST(FilterType filter);
virtual const ActionInfo &Info(QAction *);
virtual const QString Info(QAction *);
virtual const PluginInfo &Info();
virtual const FilterClass getClass(QAction *);

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.11 2006/11/29 00:59:16 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.10 2006/11/27 06:57:19 cignoni
Wrong way of using the __DATE__ preprocessor symbol
@ -208,12 +211,6 @@ int ColladaIOPlugin::GetExportMaskCapability(QString &format) const
return 0;
}
const ActionInfo &ColladaIOPlugin::Info(QAction *action)
{
static ActionInfo ai;
return ai;
}
const PluginInfo &ColladaIOPlugin::Info()
{
static PluginInfo ai;

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.3 2006/11/29 00:59:16 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.2 2006/09/22 06:08:17 granzuglia
colladaio.pro updated with support for FCollada 1.13
@ -51,9 +54,9 @@ class ColladaIOPlugin : public QObject, public MeshIOInterface
std::vector<MeshModel*> _mp;
QList<Format> importFormats() const;
QList<Format> exportFormats() const;
const ActionInfo &Info(QAction *);
const PluginInfo &Info();
QList<Format> exportFormats() const;
const PluginInfo &Info();
int GetExportMaskCapability(QString &format) const;
bool open(const QString &formatName, QString &fileName, MeshModel &m, int& mask, vcg::CallBackPos *cb=0, QWidget *parent=0);

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.3 2006/11/29 00:59:16 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.2 2006/11/08 15:49:42 cignoni
Added quality to the loaded masks
@ -510,12 +513,6 @@ QList<MeshIOInterface::Format> EpochIO::importFormats() const
return formatList;
};
const ActionInfo &EpochIO::Info(QAction *action)
{
static ActionInfo ai;
return ai;
}
const PluginInfo &EpochIO::Info()
{
static PluginInfo ai;

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.2 2006/11/29 00:59:16 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.1 2006/11/07 18:14:21 cignoni
Moved from the epoch svn repository
@ -55,7 +58,6 @@ public:
~EpochIO();
v3dImportDialog *epochDialog;
QString lastFileName;
const ActionInfo &Info(QAction *);
const PluginInfo &Info();
int GetExportMaskCapability(QString &) const {return 0;}

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.29 2006/11/29 00:59:17 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.28 2006/11/07 09:10:32 cignoni
Removed shorthHelp and added topo_non_coherent (draft)
@ -161,26 +164,24 @@ const QString ExtraMeshColorizePlugin::ST(FilterType c) {
}
return QString("error!");
}
const ActionInfo &ExtraMeshColorizePlugin::Info(QAction *action)
const QString ExtraMeshColorizePlugin::Info(QAction *action)
{
static ActionInfo ai;
switch(ID(action))
{
case CP_MAP_QUALITY_INTO_COLOR : ai.Help = tr("Colorize vertex and faces depending on quality field (manually equalized).");break;
case CP_GAUSSIAN : ai.Help = tr("Colorize vertex and faces depending on equalized gaussian curvature.");break;
case CP_MEAN : ai.Help = tr("Colorize vertex and faces depending on equalized mean curvature.");break;
case CP_RMS : ai.Help = tr("Colorize vertex and faces depending on equalized root mean square curvature.");break;
case CP_ABSOLUTE : ai.Help = tr("Colorize vertex and faces depending on equalize absolute curvature.");break;
case CP_SELFINTERSECT: ai.Help = tr("Colorize only self intersecting faces.");break;
case CP_BORDER : ai.Help = tr("Colorize only border edges.");break;
case CP_COLOR_NON_MANIFOLD: ai.Help = tr("Colorize only non manifold edges.");break;
case CP_SMOOTH : ai.Help = tr("Apply laplacian smooth for colors.");break;
case CP_RESTORE_ORIGINAL : ai.Help = tr("Restore original per vertex color.");break;
case CP_COLOR_NON_TOPO_COHERENT : ai.Help = tr("Color edges topologically non coherent.");break;
default: assert(0);
case CP_MAP_QUALITY_INTO_COLOR : return tr("Colorize vertex and faces depending on quality field (manually equalized).");
case CP_GAUSSIAN : return tr("Colorize vertex and faces depending on equalized gaussian curvature.");
case CP_MEAN : return tr("Colorize vertex and faces depending on equalized mean curvature.");
case CP_RMS : return tr("Colorize vertex and faces depending on equalized root mean square curvature.");
case CP_ABSOLUTE : return tr("Colorize vertex and faces depending on equalize absolute curvature.");
case CP_SELFINTERSECT: return tr("Colorize only self intersecting faces.");
case CP_BORDER : return tr("Colorize only border edges.");
case CP_COLOR_NON_MANIFOLD: return tr("Colorize only non manifold edges.");
case CP_SMOOTH : return tr("Apply laplacian smooth for colors.");
case CP_RESTORE_ORIGINAL : return tr("Restore original per vertex color.");
case CP_COLOR_NON_TOPO_COHERENT :return tr("Color edges topologically non coherent.");
default: assert(0);
}
return ai;
return QString();
}
const PluginInfo &ExtraMeshColorizePlugin::Info()
{

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.21 2006/11/29 00:59:17 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.20 2006/11/07 09:10:32 cignoni
Removed shorthHelp and added topo_non_coherent (draft)
@ -89,7 +92,7 @@ public:
~ExtraMeshColorizePlugin(){};
virtual const QString ST(FilterType filter);
virtual const ActionInfo &Info(QAction *);
virtual const QString Info(QAction *);
virtual const PluginInfo &Info();
virtual const FilterClass getClass(QAction *);
virtual bool getParameters(QAction *, QWidget *, MeshModel &m, FilterParameter &par);

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.38 2006/11/29 00:59:17 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.37 2006/11/07 09:24:10 cignoni
Removed shorthHelp and reformatted the code
@ -91,17 +94,17 @@ Some changes in DrawAxis in order to compile under gcc
using namespace vcg;
const ActionInfo &ExtraMeshDecoratePlugin::Info(QAction *action)
const QString ExtraMeshDecoratePlugin::Info(QAction *action)
{
static ActionInfo ai;
switch(ID(action))
{
case DP_SHOW_AXIS : ai.Help = tr("Draws XYZ axes in world coordinates");break;
case DP_SHOW_BOX_CORNERS: ai.Help = tr("Draws object's bounding box corners");break;
case DP_SHOW_NORMALS: ai.Help = tr("Draws object vertex normals");break;
case DP_SHOW_QUOTED_BOX: ai.Help = tr("Draws quoted box");break;
case DP_SHOW_AXIS : return tr("Draws XYZ axes in world coordinates");
case DP_SHOW_BOX_CORNERS:return tr("Draws object's bounding box corners");
case DP_SHOW_NORMALS: return tr("Draws object vertex normals");
case DP_SHOW_QUOTED_BOX: return tr("Draws quoted box");
}
return ai;
assert(0);
return QString();
}
const PluginInfo &ExtraMeshDecoratePlugin::Info()

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.18 2006/11/29 00:59:18 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.17 2006/11/07 09:24:10 cignoni
Removed shorthHelp and reformatted the code
@ -79,7 +82,7 @@ class ExtraMeshDecoratePlugin : public QObject, public MeshDecorateInterface
{
Q_OBJECT
Q_INTERFACES(MeshDecorateInterface)
virtual const ActionInfo &Info(QAction *);
virtual const QString Info(QAction *);
virtual const PluginInfo &Info();
enum {

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.7 2006/11/29 00:59:18 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.6 2006/11/27 06:57:20 cignoni
Wrong way of using the __DATE__ preprocessor symbol
@ -69,15 +72,14 @@ QList<QAction *> ExtraMeshEditPlugin::actions() const {
}
const ActionInfo &ExtraMeshEditPlugin::Info(QAction *action)
{
static ActionInfo ai;
if( action->text() == tr("Select Faces in a region") )
ai.Help = tr("Interactive selection of faces inside a dragged rectangle in screen space");
return ai;
}
const QString ExtraMeshEditPlugin::Info(QAction *action)
{
if( action->text() != tr("Select Faces in a region") ) assert (0);
const PluginInfo &ExtraMeshEditPlugin::Info()
return tr("Interactive selection of faces inside a dragged rectangle in screen space");
}
const PluginInfo &ExtraMeshEditPlugin::Info()
{
static PluginInfo ai;
ai.Date=tr(__DATE__);

View File

@ -41,7 +41,7 @@ public:
virtual ~ExtraMeshEditPlugin() {}
virtual const ActionInfo &Info(QAction *);
virtual const QString Info(QAction *);
virtual const PluginInfo &Info();
virtual void StartEdit(QAction * /*mode*/, MeshModel &/*m*/, GLArea * /*parent*/);

View File

@ -22,6 +22,9 @@
/****************************************************************************
History
$Log$
Revision 1.76 2006/11/29 00:59:18 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.75 2006/11/27 06:57:20 cignoni
Wrong way of using the __DATE__ preprocessor symbol
@ -278,30 +281,30 @@ ExtraMeshFilterPlugin::~ExtraMeshFilterPlugin() {
}
}
const ActionInfo &ExtraMeshFilterPlugin::Info(QAction *action)
const QString ExtraMeshFilterPlugin::Info(QAction *action)
{
static ActionInfo ai;
switch(ID(action))
{
case FP_LOOP_SS : ai.Help = tr("Apply Loop's Subdivision Surface algorithm. It is an approximate method which subdivide each triangle in four faces. It works for every triangle and has rules for extraordinary vertices"); break;
case FP_BUTTERFLY_SS : ai.Help = tr("Apply Butterfly Subdivision Surface algorithm. It is an interpolated method, defined on arbitrary triangular meshes. The scheme is known to be C1 but not C2 on regular meshes"); break;
case FP_MIDPOINT : ai.Help = tr("Splits every edge in two"); break;
case FP_REMOVE_UNREFERENCED_VERTEX: ai.Help = tr("Check for every vertex on the mesh if it is referenced by a face and removes it"); break;
case FP_REMOVE_DUPLICATED_VERTEX : ai.Help = tr("Check for every vertex on the mesh if there are two vertices with same coordinates and removes it"); break;
case FP_REMOVE_FACES_BY_AREA : ai.Help = tr("Removes null faces (the one with area equal to zero)"); break;
case FP_REMOVE_FACES_BY_EDGE : ai.Help = tr("Remove from the mesh all triangles whose have an edge with lenght greater or equal than a threshold"); break;
case FP_LAPLACIAN_SMOOTH : ai.Help = tr("Laplacian smooth of the mesh: for each vertex it calculates the average position with nearest vertex"); break;
case FP_HC_LAPLACIAN_SMOOTH : ai.Help = tr("HC Laplacian Smoothing, extended version of Laplacian Smoothing, based on the paper of Vollmer, Mencl, and Müller"); break;
case FP_TWO_STEP_SMOOTH : ai.Help = tr("Two Step Smoothing, Normal Smoothing and vertex fitting smoothing, based on the paper of ..."); break;
case FP_CLUSTERING : ai.Help = tr("Collapse vertices by creating a three dimensional grid enveloping the mesh and discretizes them based on the cells of this grid"); break;
case FP_QUADRIC_SIMPLIFICATION: ai.Help = tr("Simplify a mesh using a Quadric based Edge Collapse Strategy, better than clustering but slower"); break;
case FP_REORIENT : ai.Help = tr("Re-oriented the adjacencies of the face of the mesh"); break;
case FP_INVERT_FACES : ai.Help = tr("Invert faces orentation, flip the normal of the mesh"); break;
case FP_TRANSFORM : ai.Help = tr("Apply transformation, you can rotate, translate or scale the mesh"); break;
case FP_NORMAL_EXTRAPOLATION : ai.Help = tr("Compute the normals of a mesh without exploiting the triangle connectivity");break;
case FP_CLOSE_HOLES_LIEPA : ai.Help = tr("Close holes smaller than a given threshold");break;
case FP_LOOP_SS : return tr("Apply Loop's Subdivision Surface algorithm. It is an approximate method which subdivide each triangle in four faces. It works for every triangle and has rules for extraordinary vertices");
case FP_BUTTERFLY_SS : return tr("Apply Butterfly Subdivision Surface algorithm. It is an interpolated method, defined on arbitrary triangular meshes. The scheme is known to be C1 but not C2 on regular meshes");
case FP_MIDPOINT : return tr("Splits every edge in two");
case FP_REMOVE_UNREFERENCED_VERTEX: return tr("Check for every vertex on the mesh if it is referenced by a face and removes it");
case FP_REMOVE_DUPLICATED_VERTEX : return tr("Check for every vertex on the mesh if there are two vertices with same coordinates and removes it");
case FP_REMOVE_FACES_BY_AREA : return tr("Removes null faces (the one with area equal to zero)");
case FP_REMOVE_FACES_BY_EDGE : return tr("Remove from the mesh all triangles whose have an edge with lenght greater or equal than a threshold");
case FP_LAPLACIAN_SMOOTH : return tr("Laplacian smooth of the mesh: for each vertex it calculates the average position with nearest vertex");
case FP_HC_LAPLACIAN_SMOOTH : return tr("HC Laplacian Smoothing, extended version of Laplacian Smoothing, based on the paper of Vollmer, Mencl, and Müller");
case FP_TWO_STEP_SMOOTH : return tr("Two Step Smoothing, Normal Smoothing and vertex fitting smoothing, based on the paper of ...");
case FP_CLUSTERING : return tr("Collapse vertices by creating a three dimensional grid enveloping the mesh and discretizes them based on the cells of this grid");
case FP_QUADRIC_SIMPLIFICATION: return tr("Simplify a mesh using a Quadric based Edge Collapse Strategy, better than clustering but slower");
case FP_REORIENT : return tr("Re-oriented the adjacencies of the face of the mesh");
case FP_INVERT_FACES : return tr("Invert faces orentation, flip the normal of the mesh");
case FP_TRANSFORM : return tr("Apply transformation, you can rotate, translate or scale the mesh");
case FP_NORMAL_EXTRAPOLATION : return tr("Compute the normals of a mesh without exploiting the triangle connectivity");
case FP_CLOSE_HOLES_LIEPA : return tr("Close holes smaller than a given threshold");
}
return ai;
assert(0);
return QString();
}

View File

@ -22,6 +22,9 @@
****************************************************************************/
/* History
$Log$
Revision 1.35 2006/11/29 00:59:18 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.34 2006/10/22 21:09:35 cignoni
Added Close Hole
@ -34,34 +37,6 @@ Added remove non manifold and quadric simplification filter.
Revision 1.31 2006/05/25 09:46:38 cignoni
missing std and and all the other gcc detected syntax errors
Revision 1.30 2006/05/25 06:24:14 cignoni
Decimator dialog no more necessary
Revision 1.29 2006/05/25 04:57:45 cignoni
Major 0.7 release. A lot of things changed. Colorize interface gone away, Editing and selection start to work.
Optional data really working. Clustering decimation totally rewrote. History start to work. Filters organized in classes.
Revision 1.28 2006/04/12 15:12:18 cignoni
Added Filter classes (cleaning, meshing etc)
Revision 1.27 2006/02/21 15:24:47 mariolatronico
case typo on #include
Revision 1.26 2006/02/20 21:11:36 giec
bugfix
Revision 1.25 2006/02/20 20:52:37 giec
replace refine and detacher dialog whit GnericELDialog
Revision 1.24 2006/02/06 10:18:27 mariolatronico
reverted to old behaviour, removed QEdgeLength
Revision 1.23 2006/02/05 11:22:40 mariolatronico
changed spinbox to QEdgeLength widget
Revision 1.22 2006/01/31 14:40:40 mariolatronico
removed unused variable ActionInfo *ai, added Log history
****************************************************************************/
#ifndef EXTRAFILTERSPLUGIN_H
@ -114,7 +89,7 @@ class ExtraMeshFilterPlugin : public QObject, public MeshFilterInterface
ExtraMeshFilterPlugin();
~ExtraMeshFilterPlugin();
virtual const QString ST(FilterType filter);
virtual const ActionInfo &Info(QAction *);
virtual const QString Info(QAction *);
virtual const PluginInfo &Info();
virtual const FilterClass getClass(QAction *);
virtual bool getParameters(QAction *, QWidget *, MeshModel &m, FilterParameter &par);

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.89 2006/11/29 00:59:19 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.88 2006/11/16 11:25:32 e_cerisoli
Update meshio.cpp: new file I/O
@ -333,12 +336,6 @@ int ExtraMeshIOPlugin::GetExportMaskCapability(QString &format) const
return 0;
}
const ActionInfo &ExtraMeshIOPlugin::Info(QAction *action)
{
static ActionInfo ai;
return ai;
}
const PluginInfo &ExtraMeshIOPlugin::Info()
{
static PluginInfo ai;

View File

@ -24,6 +24,9 @@
History
$Log$
Revision 1.23 2006/11/29 00:59:19 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.22 2006/03/07 13:30:24 cignoni
undoed wrong removal...
@ -71,8 +74,7 @@ class ExtraMeshIOPlugin : public QObject, public MeshIOInterface
public:
QList<Format> importFormats() const;
QList<Format> exportFormats() const;
const ActionInfo &Info(QAction *);
const PluginInfo &Info();
const PluginInfo &Info();
int GetExportMaskCapability(QString &format) const;
bool open(const QString &formatName, QString &fileName, MeshModel &m, int& mask, vcg::CallBackPos *cb=0, QWidget *parent=0);

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.7 2006/11/29 00:59:20 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.6 2006/11/27 06:57:21 cignoni
Wrong way of using the __DATE__ preprocessor symbol
@ -127,18 +130,18 @@ bool SelectionFilterPlugin::applyFilter(QAction *action, MeshModel &m, FilterPar
return true;
}
const ActionInfo &SelectionFilterPlugin::Info(QAction *action)
const QString SelectionFilterPlugin::Info(QAction *action)
{
static ActionInfo ai;
switch(ID(action))
{
case FP_SELECT_DILATE : ai.Help = tr("Dilate (expand) the current set of selected faces"); break;
case FP_SELECT_ERODE : ai.Help = tr("Erode (reduce) the current set of selected faces"); break;
case FP_SELECT_INVERT : ai.Help = tr("Invert the current set of selected faces"); break;
case FP_SELECT_NONE : ai.Help = tr("Clear the current set of selected faces"); break;
case FP_SELECT_ALL : ai.Help = tr("Select all the faces of the current mesh"); break;
case FP_SELECT_DILATE : return tr("Dilate (expand) the current set of selected faces");
case FP_SELECT_ERODE : return tr("Erode (reduce) the current set of selected faces");
case FP_SELECT_INVERT : return tr("Invert the current set of selected faces");
case FP_SELECT_NONE : return tr("Clear the current set of selected faces");
case FP_SELECT_ALL : return tr("Select all the faces of the current mesh");
}
return ai;
assert(0);
return QString();
}
const PluginInfo &SelectionFilterPlugin::Info()

View File

@ -1,22 +1,30 @@
/****************************************************************************
**
** Copyright (C) 2005-2005 Trolltech AS. All rights reserved.
**
** This file is part of the example classes of the Qt Toolkit.
**
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
** information about Qt Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
* MeshLab o o *
* A versatile mesh processing toolbox o o *
* _ O _ *
* Copyright(C) 2005 \/)\/ *
* Visual Computing Lab /\/| *
* ISTI - Italian National Research Council | *
* \ *
* All rights reserved. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) *
* for more details. *
* *
****************************************************************************/
/* History
$Log$
Revision 1.4 2006/11/29 00:59:20 cignoni
Cleaned plugins interface; changed useless help class into a plain string
****************************************************************************/
#ifndef EDITPLUGIN_H
@ -44,7 +52,7 @@ class SelectionFilterPlugin : public QObject, public MeshFilterInterface
SelectionFilterPlugin();
~SelectionFilterPlugin();
virtual const ActionInfo &Info(QAction *);
virtual const QString Info(QAction *);
virtual const PluginInfo &Info();
virtual const QString ST(FilterType filter);
@ -55,7 +63,7 @@ class SelectionFilterPlugin : public QObject, public MeshFilterInterface
protected:
ActionInfo *ai;
// ActionInfo *ai;
};

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.3 2006/11/29 00:59:20 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.2 2006/11/27 06:57:21 cignoni
Wrong way of using the __DATE__ preprocessor symbol
@ -66,11 +69,9 @@ const QString ExtraSamplePlugin::ST(FilterType filter)
ExtraSamplePlugin::~ExtraSamplePlugin()
{}
const ActionInfo &ExtraSamplePlugin::Info(QAction *action)
const QString &ExtraSamplePlugin::Info(QAction *action)
{
static ActionInfo ai;
ai.Help = tr("Apply Filter Move Vertex");
return ai;
return tr("Apply Filter Move Vertex");
}

View File

@ -23,6 +23,9 @@
/****************************************************************************
History
$Log$
Revision 1.2 2006/11/29 00:59:21 cignoni
Cleaned plugins interface; changed useless help class into a plain string
Revision 1.1 2006/09/25 09:24:39 e_cerisoli
add sampleplugins
@ -53,7 +56,7 @@ public:
bool init_randnumber;
virtual const QString ST(FilterType filter);
virtual const ActionInfo &Info(QAction *);
virtual const QString &Info(QAction *);
virtual const PluginInfo &Info();
virtual bool applyFilter(QAction *filter, MeshModel &m, FilterParameter & /*parent*/, vcg::CallBackPos * cb) ;