mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-18 18:44:39 +00:00
io_plugin_interface.h, fix filter_trioptimize
This commit is contained in:
parent
2fff353d5d
commit
7ca8d10a77
@ -35,6 +35,7 @@ set(HEADERS
|
||||
filter_parameter/value.h
|
||||
interfaces/mainwindow_interface.h
|
||||
interfaces/plugin_interface.h
|
||||
interfaces/io_plugin_interface.h
|
||||
GLExtensionsManager.h
|
||||
GLLogStream.h
|
||||
filterscript.h
|
||||
|
||||
@ -48,6 +48,7 @@ HEADERS += \
|
||||
filterscript.h \
|
||||
GLLogStream.h \
|
||||
interfaces.h \
|
||||
interfaces/io_plugin_interface.h \
|
||||
interfaces/mainwindow_interface.h \
|
||||
interfaces/plugin_interface.h \
|
||||
ml_mesh_type.h \
|
||||
|
||||
@ -52,80 +52,6 @@ class GLAreaReg;
|
||||
|
||||
class MeshModel;
|
||||
|
||||
/** \brief The MeshIOInterface is the base class for all the single mesh loading plugins.
|
||||
*/
|
||||
class MeshIOInterface : public PluginInterface
|
||||
{
|
||||
public:
|
||||
class Format
|
||||
{
|
||||
public:
|
||||
Format(QString description, QString ex) : description(description) { extensions << ex; }
|
||||
QString description;
|
||||
QStringList extensions;
|
||||
};
|
||||
|
||||
MeshIOInterface() : PluginInterface() { }
|
||||
virtual ~MeshIOInterface() {}
|
||||
|
||||
virtual QList<Format> importFormats() const = 0;
|
||||
virtual QList<Format> exportFormats() const = 0;
|
||||
|
||||
// This function is called to initialize the list of additional parameters that a OPENING filter could require
|
||||
// it is called by the framework BEFORE the actual mesh loading to perform to determine how parse the input file
|
||||
// The instanced parameters are then passed to the open at the loading time.
|
||||
// Typical example of use to decide what subportion of a mesh you have to load.
|
||||
// If you do not need any additional processing simply do not override this and ignore the parameterSet in the open
|
||||
virtual void initPreOpenParameter(const QString &/*format*/, const QString &/*fileName*/, RichParameterList & /*par*/) {}
|
||||
|
||||
// This function is called to initialize the list of additional parameters that a OPENING filter could require
|
||||
// it is called by the framework AFTER the mesh is already loaded to perform more or less standard processing on the mesh.
|
||||
// typical example: unifying vertices in stl models.
|
||||
// If you do not need any additional processing do nothing.
|
||||
virtual void initOpenParameter(const QString &/*format*/, MeshModel &/*m*/, RichParameterList & /*par*/) {}
|
||||
|
||||
// This is the corresponding function that is called after the mesh is loaded with the initialized parameters
|
||||
virtual void applyOpenParameter(const QString &/*format*/, MeshModel &/*m*/, const RichParameterList &/*par*/) {}
|
||||
|
||||
// This function is called to initialize the list of additional parameters that a SAVING filter could require
|
||||
// it is called by the framework after the mesh is loaded to perform more or less standard processing on the mesh.
|
||||
// typical example: ascii or binary format for ply or stl
|
||||
// If you do not need any additional parameter simply do nothing.
|
||||
virtual void initSaveParameter(const QString &/*format*/, MeshModel &/*m*/, RichParameterList & /*par*/) {}
|
||||
|
||||
|
||||
virtual void GetExportMaskCapability(const QString &format, int &capability, int &defaultBits) const = 0;
|
||||
|
||||
/// callback used to actually load a mesh from a file
|
||||
virtual bool open(
|
||||
const QString &format, /// the extension of the format e.g. "PLY"
|
||||
const QString &fileName, /// The name of the file to be opened
|
||||
MeshModel &m, /// The mesh that is filled with the file content
|
||||
int &mask, /// a bit mask that will be filled reporting what kind of data we have found in the file (per vertex color, texture coords etc)
|
||||
const RichParameterList & par, /// The parameters that have been set up in the initPreOpenParameter()
|
||||
vcg::CallBackPos *cb = 0, /// standard callback for reporting progress in the loading
|
||||
QWidget *parent = 0) = 0; /// you should not use this...
|
||||
|
||||
virtual bool save(
|
||||
const QString &format, // the extension of the format e.g. "PLY"
|
||||
const QString &fileName,
|
||||
MeshModel &m,
|
||||
const int mask, // a bit mask indicating what kind of the data present in the mesh should be saved (e.g. you could not want to save normals in ply files)
|
||||
const RichParameterList & par,
|
||||
vcg::CallBackPos *cb = 0,
|
||||
QWidget *parent = 0) = 0;
|
||||
|
||||
/// This function is invoked by the framework when the import/export plugin fails to give some info to the user about the failure
|
||||
/// io plugins should avoid using QMessageBox for reporting errors.
|
||||
/// Failure should put some meaningful information inside the errorMessage string.
|
||||
virtual QString &errorMsg() { return this->errorMessage; }
|
||||
void clearErrorString() { errorMessage.clear(); }
|
||||
|
||||
// this string is used to pass back to the framework error messages in case of failure of a filter apply.
|
||||
// NEVER EVER use a msgbox to say something to the user.
|
||||
QString errorMessage;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
\brief The MeshFilterInterface class provide the interface of the filter plugins.
|
||||
@ -564,7 +490,6 @@ public:
|
||||
#define MESHLAB_PLUGIN_IID_EXPORTER(x) Q_PLUGIN_METADATA(IID x)
|
||||
#define MESHLAB_PLUGIN_NAME_EXPORTER(x)
|
||||
|
||||
#define MESH_IO_INTERFACE_IID "vcg.meshlab.MeshIOInterface/1.0"
|
||||
#define MESH_FILTER_INTERFACE_IID "vcg.meshlab.MeshFilterInterface/1.0"
|
||||
#define MESHLAB_FILTER_INTERFACE_IID "vcg.meshlab.MeshLabFilterInterface/1.0"
|
||||
#define MESH_RENDER_INTERFACE_IID "vcg.meshlab.MeshRenderInterface/1.0"
|
||||
@ -572,7 +497,6 @@ public:
|
||||
#define MESH_EDIT_INTERFACE_IID "vcg.meshlab.MeshEditInterface/1.0"
|
||||
#define MESH_EDIT_INTERFACE_FACTORY_IID "vcg.meshlab.MeshEditInterfaceFactory/1.0"
|
||||
|
||||
Q_DECLARE_INTERFACE(MeshIOInterface, MESH_IO_INTERFACE_IID)
|
||||
Q_DECLARE_INTERFACE(MeshFilterInterface, MESH_FILTER_INTERFACE_IID)
|
||||
Q_DECLARE_INTERFACE(MeshRenderInterface, MESH_RENDER_INTERFACE_IID)
|
||||
Q_DECLARE_INTERFACE(MeshDecorateInterface, MESH_DECORATE_INTERFACE_IID)
|
||||
|
||||
112
src/common/interfaces/io_plugin_interface.h
Normal file
112
src/common/interfaces/io_plugin_interface.h
Normal file
@ -0,0 +1,112 @@
|
||||
/****************************************************************************
|
||||
* MeshLab o o *
|
||||
* A versatile mesh processing toolbox o o *
|
||||
* _ O _ *
|
||||
* Copyright(C) 2005-2020 \/)\/ *
|
||||
* 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. *
|
||||
* *
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef MESHLAB_IO_PLUGIN_INTERFACE_H
|
||||
#define MESHLAB_IO_PLUGIN_INTERFACE_H
|
||||
|
||||
#include <wrap/callback.h>
|
||||
|
||||
#include "plugin_interface.h"
|
||||
|
||||
/** \brief The MeshIOInterface is the base class for all the single mesh loading plugins.
|
||||
*/
|
||||
class IOPluginInterface : public PluginInterface
|
||||
{
|
||||
public:
|
||||
class Format
|
||||
{
|
||||
public:
|
||||
Format(QString description, QString ex) : description(description) { extensions << ex; }
|
||||
QString description;
|
||||
QStringList extensions;
|
||||
};
|
||||
|
||||
IOPluginInterface() : PluginInterface() { }
|
||||
virtual ~IOPluginInterface() {}
|
||||
|
||||
virtual QList<Format> importFormats() const = 0;
|
||||
virtual QList<Format> exportFormats() const = 0;
|
||||
|
||||
// This function is called to initialize the list of additional parameters that a OPENING filter could require
|
||||
// it is called by the framework BEFORE the actual mesh loading to perform to determine how parse the input file
|
||||
// The instanced parameters are then passed to the open at the loading time.
|
||||
// Typical example of use to decide what subportion of a mesh you have to load.
|
||||
// If you do not need any additional processing simply do not override this and ignore the parameterSet in the open
|
||||
virtual void initPreOpenParameter(const QString &/*format*/, const QString &/*fileName*/, RichParameterList & /*par*/) {}
|
||||
|
||||
// This function is called to initialize the list of additional parameters that a OPENING filter could require
|
||||
// it is called by the framework AFTER the mesh is already loaded to perform more or less standard processing on the mesh.
|
||||
// typical example: unifying vertices in stl models.
|
||||
// If you do not need any additional processing do nothing.
|
||||
virtual void initOpenParameter(const QString &/*format*/, MeshModel &/*m*/, RichParameterList & /*par*/) {}
|
||||
|
||||
// This is the corresponding function that is called after the mesh is loaded with the initialized parameters
|
||||
virtual void applyOpenParameter(const QString &/*format*/, MeshModel &/*m*/, const RichParameterList &/*par*/) {}
|
||||
|
||||
// This function is called to initialize the list of additional parameters that a SAVING filter could require
|
||||
// it is called by the framework after the mesh is loaded to perform more or less standard processing on the mesh.
|
||||
// typical example: ascii or binary format for ply or stl
|
||||
// If you do not need any additional parameter simply do nothing.
|
||||
virtual void initSaveParameter(const QString &/*format*/, MeshModel &/*m*/, RichParameterList & /*par*/) {}
|
||||
|
||||
|
||||
virtual void GetExportMaskCapability(const QString &format, int &capability, int &defaultBits) const = 0;
|
||||
|
||||
/// callback used to actually load a mesh from a file
|
||||
virtual bool open(
|
||||
const QString &format, /// the extension of the format e.g. "PLY"
|
||||
const QString &fileName, /// The name of the file to be opened
|
||||
MeshModel &m, /// The mesh that is filled with the file content
|
||||
int &mask, /// a bit mask that will be filled reporting what kind of data we have found in the file (per vertex color, texture coords etc)
|
||||
const RichParameterList & par, /// The parameters that have been set up in the initPreOpenParameter()
|
||||
vcg::CallBackPos *cb = 0, /// standard callback for reporting progress in the loading
|
||||
QWidget *parent = 0) = 0; /// you should not use this...
|
||||
|
||||
virtual bool save(
|
||||
const QString &format, // the extension of the format e.g. "PLY"
|
||||
const QString &fileName,
|
||||
MeshModel &m,
|
||||
const int mask,// a bit mask indicating what kind of the data present in the mesh should be saved (e.g. you could not want to save normals in ply files)
|
||||
const RichParameterList & par,
|
||||
vcg::CallBackPos *cb = 0,
|
||||
QWidget *parent = 0) = 0;
|
||||
|
||||
/// This function is invoked by the framework when the import/export plugin fails to give some info to the user about the failure
|
||||
/// io plugins should avoid using QMessageBox for reporting errors.
|
||||
/// Failure should put some meaningful information inside the errorMessage string.
|
||||
virtual QString &errorMsg() { return this->errorMessage; }
|
||||
void clearErrorString() { errorMessage.clear(); }
|
||||
|
||||
// this string is used to pass back to the framework error messages in case of failure of a filter apply.
|
||||
// NEVER EVER use a msgbox to say something to the user.
|
||||
QString errorMessage;
|
||||
|
||||
};
|
||||
|
||||
#define MESHLAB_PLUGIN_IID_EXPORTER(x) Q_PLUGIN_METADATA(IID x)
|
||||
#define MESHLAB_PLUGIN_NAME_EXPORTER(x)
|
||||
|
||||
#define MESH_IO_INTERFACE_IID "vcg.meshlab.IOPluginInterface/1.0"
|
||||
Q_DECLARE_INTERFACE(IOPluginInterface, MESH_IO_INTERFACE_IID)
|
||||
|
||||
#endif // MESHLAB_IO_PLUGIN_INTERFACE_H
|
||||
@ -107,7 +107,7 @@ void PluginManager::loadPlugins(RichParameterList& defaultGlobal, const QDir& pl
|
||||
throw MLException("Missing Arity for " +fileName+filterAction->text());
|
||||
}
|
||||
}
|
||||
MeshIOInterface *iIO = qobject_cast<MeshIOInterface *>(plugin);
|
||||
IOPluginInterface *iIO = qobject_cast<IOPluginInterface *>(plugin);
|
||||
if (iIO)
|
||||
{
|
||||
iCommon = iIO;
|
||||
@ -271,11 +271,11 @@ void PluginManager::knownIOFormats()
|
||||
{
|
||||
QStringList* formatFilters = NULL;
|
||||
QString allKnownFormatsFilter = QObject::tr("All known formats (");
|
||||
for (QVector<MeshIOInterface*>::iterator itIOPlugin = meshIOPlug.begin(); itIOPlugin != meshIOPlug.end(); ++itIOPlugin)
|
||||
for (QVector<IOPluginInterface*>::iterator itIOPlugin = meshIOPlug.begin(); itIOPlugin != meshIOPlug.end(); ++itIOPlugin)
|
||||
{
|
||||
MeshIOInterface* pMeshIOPlugin = *itIOPlugin;
|
||||
QList<MeshIOInterface::Format> format;
|
||||
QMap<QString, MeshIOInterface*>* map = NULL;
|
||||
IOPluginInterface* pMeshIOPlugin = *itIOPlugin;
|
||||
QList<IOPluginInterface::Format> format;
|
||||
QMap<QString, IOPluginInterface*>* map = NULL;
|
||||
if (inpOut == int(IMPORT))
|
||||
{
|
||||
map = &allKnowInputFormats;
|
||||
@ -288,9 +288,9 @@ void PluginManager::knownIOFormats()
|
||||
formatFilters = &outFilters;
|
||||
format = pMeshIOPlugin->exportFormats();
|
||||
}
|
||||
for (QList<MeshIOInterface::Format>::iterator itf = format.begin(); itf != format.end(); ++itf)
|
||||
for (QList<IOPluginInterface::Format>::iterator itf = format.begin(); itf != format.end(); ++itf)
|
||||
{
|
||||
MeshIOInterface::Format currentFormat = *itf;
|
||||
IOPluginInterface::Format currentFormat = *itf;
|
||||
|
||||
QString currentFilterEntry = currentFormat.description + " (";
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
#define PLUGINMANAGER_H
|
||||
|
||||
#include "interfaces.h"
|
||||
#include "interfaces/io_plugin_interface.h"
|
||||
//#include "scriptsyntax.h"
|
||||
|
||||
#include<QMap>
|
||||
@ -59,12 +60,12 @@ public:
|
||||
|
||||
QMap<QString, QAction*> actionFilterMap;
|
||||
QMap<QString, MeshFilterInterface*> stringFilterMap;
|
||||
QMap<QString,MeshIOInterface*> allKnowInputFormats;
|
||||
QMap<QString,MeshIOInterface*> allKnowOutputFormats;
|
||||
QMap<QString,IOPluginInterface*> allKnowInputFormats;
|
||||
QMap<QString,IOPluginInterface*> allKnowOutputFormats;
|
||||
QStringList inpFilters;
|
||||
QStringList outFilters;
|
||||
|
||||
QVector<MeshIOInterface*> meshIOPlug;
|
||||
QVector<IOPluginInterface*> meshIOPlug;
|
||||
QVector<MeshFilterInterface*> meshFilterPlug;
|
||||
QVector<MeshRenderInterface*> meshRenderPlug;
|
||||
QVector<MeshDecorateInterface*> meshDecoratePlug;
|
||||
|
||||
@ -147,7 +147,7 @@ private slots:
|
||||
public:
|
||||
|
||||
bool exportMesh(QString fileName,MeshModel* mod,const bool saveAllPossibleAttributes);
|
||||
bool loadMesh(const QString& fileName,MeshIOInterface *pCurrentIOPlugin,MeshModel* mm,int& mask,RichParameterList* prePar,const Matrix44m &mtr=Matrix44m::Identity(), bool isareload = false, MLRenderingData* rendOpt = NULL);
|
||||
bool loadMesh(const QString& fileName,IOPluginInterface *pCurrentIOPlugin,MeshModel* mm,int& mask,RichParameterList* prePar,const Matrix44m &mtr=Matrix44m::Identity(), bool isareload = false, MLRenderingData* rendOpt = NULL);
|
||||
|
||||
void computeRenderingDataOnLoading(MeshModel* mm,bool isareload, MLRenderingData* rendOpt = NULL);
|
||||
|
||||
|
||||
@ -2073,7 +2073,7 @@ bool MainWindow::importRaster(const QString& fileImg)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MainWindow::loadMesh(const QString& fileName, MeshIOInterface *pCurrentIOPlugin, MeshModel* mm, int& mask,RichParameterList* prePar, const Matrix44m &mtr, bool isareload, MLRenderingData* rendOpt)
|
||||
bool MainWindow::loadMesh(const QString& fileName, IOPluginInterface *pCurrentIOPlugin, MeshModel* mm, int& mask,RichParameterList* prePar, const Matrix44m &mtr, bool isareload, MLRenderingData* rendOpt)
|
||||
{
|
||||
if ((GLA() == NULL) || (mm == NULL))
|
||||
return false;
|
||||
@ -2286,7 +2286,7 @@ bool MainWindow::importMesh(QString fileName,bool isareload)
|
||||
{
|
||||
QFileInfo fi(fileName);
|
||||
QString extension = fi.suffix();
|
||||
MeshIOInterface *pCurrentIOPlugin = PM.allKnowInputFormats[extension.toLower()];
|
||||
IOPluginInterface *pCurrentIOPlugin = PM.allKnowInputFormats[extension.toLower()];
|
||||
//pCurrentIOPlugin->setLog(gla->log);
|
||||
if (pCurrentIOPlugin == NULL)
|
||||
{
|
||||
@ -2382,7 +2382,7 @@ bool MainWindow::loadMeshWithStandardParams(QString& fullPath, MeshModel* mm, co
|
||||
mm->Clear();
|
||||
QFileInfo fi(fullPath);
|
||||
QString extension = fi.suffix();
|
||||
MeshIOInterface *pCurrentIOPlugin = PM.allKnowInputFormats[extension.toLower()];
|
||||
IOPluginInterface *pCurrentIOPlugin = PM.allKnowInputFormats[extension.toLower()];
|
||||
|
||||
if(pCurrentIOPlugin != NULL)
|
||||
{
|
||||
@ -2521,7 +2521,7 @@ bool MainWindow::exportMesh(QString fileName,MeshModel* mod,const bool saveAllPo
|
||||
|
||||
QStringListIterator itFilter(suffixList);
|
||||
|
||||
MeshIOInterface *pCurrentIOPlugin = PM.allKnowOutputFormats[extension.toLower()];
|
||||
IOPluginInterface *pCurrentIOPlugin = PM.allKnowOutputFormats[extension.toLower()];
|
||||
if (pCurrentIOPlugin == 0)
|
||||
{
|
||||
QMessageBox::warning(this, "Unknown type", "File extension not supported!");
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
|
||||
#include "plugindialog.h"
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
|
||||
#include <QLabel>
|
||||
#include <QTreeWidget>
|
||||
@ -116,15 +117,15 @@ void PluginDialog::populateTreeWidget(const QString &path,const QStringList &fil
|
||||
pluginItem->setFont(0, boldFont);
|
||||
|
||||
if (plugin) {
|
||||
MeshIOInterface *iMeshIO = qobject_cast<MeshIOInterface *>(plugin);
|
||||
IOPluginInterface *iMeshIO = qobject_cast<IOPluginInterface *>(plugin);
|
||||
if (iMeshIO){
|
||||
QStringList Templist;
|
||||
foreach(const MeshIOInterface::Format f,iMeshIO->importFormats()){
|
||||
foreach(const IOPluginInterface::Format f,iMeshIO->importFormats()){
|
||||
QString formats;
|
||||
foreach(const QString s,f.extensions) formats+="Importer_"+s+" ";
|
||||
Templist.push_back(formats);
|
||||
}
|
||||
foreach(const MeshIOInterface::Format f,iMeshIO->exportFormats()){
|
||||
foreach(const IOPluginInterface::Format f,iMeshIO->exportFormats()){
|
||||
QString formats;
|
||||
foreach(const QString s,f.extensions) formats+="Exporter_"+s+" ";
|
||||
Templist.push_back(formats);
|
||||
@ -184,14 +185,14 @@ void PluginDialog::displayInfo(QTreeWidgetItem* item,int /* ncolumn*/)
|
||||
qDebug("Trying to load the plugin '%s'", qUtf8Printable(fileName));
|
||||
QObject *plugin = loader.instance();
|
||||
if (plugin) {
|
||||
MeshIOInterface *iMeshIO = qobject_cast<MeshIOInterface *>(plugin);
|
||||
IOPluginInterface *iMeshIO = qobject_cast<IOPluginInterface *>(plugin);
|
||||
if (iMeshIO){
|
||||
foreach(const MeshIOInterface::Format f,iMeshIO->importFormats()){
|
||||
foreach(const IOPluginInterface::Format f,iMeshIO->importFormats()){
|
||||
QString formats;
|
||||
foreach(const QString s,f.extensions) formats+="Importer_"+s+" ";
|
||||
if (actionName==formats) labelInfo->setText(f.description);
|
||||
}
|
||||
foreach(const MeshIOInterface::Format f,iMeshIO->exportFormats()){
|
||||
foreach(const IOPluginInterface::Format f,iMeshIO->exportFormats()){
|
||||
QString formats;
|
||||
foreach(const QString s,f.extensions) formats+="Exporter_"+s+" ";
|
||||
if (actionName==formats) labelInfo->setText(f.description);
|
||||
|
||||
@ -158,16 +158,16 @@ MeshFilterInterface::FilterClass FilterSSynth::getClass(const QAction */*filter*
|
||||
return MeshFilterInterface::MeshCreation;
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> FilterSSynth::importFormats() const
|
||||
QList<IOPluginInterface::Format> FilterSSynth::importFormats() const
|
||||
{
|
||||
QList<MeshIOInterface::Format> formats;
|
||||
formats<< MeshIOInterface::Format("Eisen Script File", tr("ES"));
|
||||
QList<IOPluginInterface::Format> formats;
|
||||
formats<< IOPluginInterface::Format("Eisen Script File", tr("ES"));
|
||||
return formats;
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> FilterSSynth::exportFormats() const
|
||||
QList<IOPluginInterface::Format> FilterSSynth::exportFormats() const
|
||||
{
|
||||
QList<MeshIOInterface::Format> formats;
|
||||
QList<IOPluginInterface::Format> formats;
|
||||
return formats ;
|
||||
}
|
||||
|
||||
|
||||
@ -31,10 +31,10 @@
|
||||
#include <common/interfaces.h>
|
||||
#include <meshlabplugins/io_x3d/io_x3d.h>
|
||||
|
||||
class FilterSSynth : public QObject,public MeshIOInterface, public MeshFilterInterface{
|
||||
class FilterSSynth : public QObject,public IOPluginInterface, public MeshFilterInterface{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_FILTER_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshFilterInterface MeshIOInterface)
|
||||
Q_INTERFACES(MeshFilterInterface IOPluginInterface)
|
||||
public:
|
||||
enum {CR_SSYNTH} ;
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ QString TriOptimizePlugin::pluginName() const
|
||||
return {};
|
||||
}
|
||||
|
||||
TriOptimizePlugin::FilterClass TriOptimizePlugin::getClass(const QAction *action)
|
||||
TriOptimizePlugin::FilterClass TriOptimizePlugin::getClass(const QAction *action) const
|
||||
{
|
||||
switch(ID(action)) {
|
||||
case FP_PLANAR_EDGE_FLIP: return MeshFilterInterface::Remeshing;
|
||||
|
||||
@ -50,7 +50,7 @@ public:
|
||||
void initParameterList(const QAction*, MeshModel &/*m*/, RichParameterList & /*parent*/);
|
||||
bool applyFilter(const QAction *filter, MeshDocument &md, const RichParameterList &/*parent*/, vcg::CallBackPos * cb) ;
|
||||
int getRequirements(const QAction*);
|
||||
FilterClass getClass(const QAction *);
|
||||
FilterClass getClass(const QAction *) const;
|
||||
int postCondition(const QAction* ) const;
|
||||
FILTER_ARITY filterArity(const QAction *) const {return SINGLE_MESH;}
|
||||
|
||||
|
||||
@ -41,12 +41,14 @@
|
||||
#ifndef __VCGLIB_IMPORT_3DS
|
||||
#define __VCGLIB_IMPORT_3DS
|
||||
|
||||
#include <wrap/callback.h>
|
||||
#include "io_3ds.h"
|
||||
|
||||
#include <wrap/callback.h>
|
||||
#include <wrap/io_trimesh/io_mask.h>
|
||||
#include <vcg/complex/complex.h>
|
||||
|
||||
// lib3ds headers
|
||||
#include <lib3ds/file.h>
|
||||
#include <lib3ds/file.h>
|
||||
#include <lib3ds/camera.h>
|
||||
#include <lib3ds/mesh.h>
|
||||
#include <lib3ds/node.h>
|
||||
|
||||
@ -41,6 +41,8 @@
|
||||
#include <wrap/io_trimesh/io_mask.h>
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QFile>
|
||||
#include <common/meshmodel.h>
|
||||
|
||||
using namespace std;
|
||||
using namespace vcg;
|
||||
@ -233,7 +235,7 @@ bool ExtraMeshIOPlugin::save(const QString &formatName, const QString &fileName,
|
||||
/*
|
||||
returns the list of the file's type which can be imported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> ExtraMeshIOPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> ExtraMeshIOPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("3D-Studio File Format" ,tr("3DS"));
|
||||
@ -243,7 +245,7 @@ QList<MeshIOInterface::Format> ExtraMeshIOPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> ExtraMeshIOPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> ExtraMeshIOPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("3D-Studio File Format" ,tr("3DS"));
|
||||
|
||||
@ -27,13 +27,13 @@
|
||||
#include <QStringList>
|
||||
#include <QString>
|
||||
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
|
||||
class ExtraMeshIOPlugin : public QObject, public MeshIOInterface
|
||||
class ExtraMeshIOPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "baseio.h"
|
||||
#include <QTextStream>
|
||||
|
||||
#include <wrap/io_trimesh/import_ply.h>
|
||||
#include <wrap/io_trimesh/import_stl.h>
|
||||
@ -429,7 +430,7 @@ QString BaseMeshIOPlugin::pluginName() const
|
||||
/*
|
||||
returns the list of the file's type which can be imported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> BaseMeshIOPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> BaseMeshIOPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("Stanford Polygon File Format", tr("PLY"));
|
||||
@ -447,7 +448,7 @@ QList<MeshIOInterface::Format> BaseMeshIOPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> BaseMeshIOPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> BaseMeshIOPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("Stanford Polygon File Format", tr("PLY"));
|
||||
|
||||
@ -23,18 +23,19 @@
|
||||
#ifndef BASEIOPLUGIN_H
|
||||
#define BASEIOPLUGIN_H
|
||||
|
||||
#include <common/interfaces.h>
|
||||
#include <common/meshmodel.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
|
||||
class BaseMeshIOPlugin : public QObject, public MeshIOInterface
|
||||
class BaseMeshIOPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
|
||||
public:
|
||||
|
||||
BaseMeshIOPlugin() : MeshIOInterface() {}
|
||||
BaseMeshIOPlugin() : IOPluginInterface() {}
|
||||
QString pluginName() const;
|
||||
|
||||
QList<Format> importFormats() const;
|
||||
|
||||
@ -160,7 +160,7 @@ QString BreMeshIOPlugin::pluginName() const
|
||||
return "IOBRE";
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> BreMeshIOPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> BreMeshIOPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("Breuckmann File Format" , tr("BRE"));
|
||||
@ -171,7 +171,7 @@ QList<MeshIOInterface::Format> BreMeshIOPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> BreMeshIOPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> BreMeshIOPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
//formatList << Format("Breuckmann File Format" , tr("BRE"));
|
||||
|
||||
@ -23,7 +23,8 @@
|
||||
#ifndef IOBREPLUGIN_H
|
||||
#define IOBREPLUGIN_H
|
||||
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
#include <common/meshmodel.h>
|
||||
|
||||
namespace vcg {
|
||||
namespace tri {
|
||||
@ -149,15 +150,15 @@ namespace io {
|
||||
}//namespace tri
|
||||
}//namespace vcg
|
||||
|
||||
class BreMeshIOPlugin : public QObject, public MeshIOInterface
|
||||
class BreMeshIOPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
public:
|
||||
|
||||
BreMeshIOPlugin() : MeshIOInterface() {}
|
||||
BreMeshIOPlugin() : IOPluginInterface() {}
|
||||
QString pluginName() const;
|
||||
|
||||
QList<Format> importFormats() const;
|
||||
|
||||
@ -88,6 +88,8 @@
|
||||
#include <algorithm>
|
||||
|
||||
#include <Qt>
|
||||
#include <QDebug>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
#include "io_collada.h"
|
||||
|
||||
@ -217,7 +219,7 @@ QString ColladaIOPlugin::pluginName() const
|
||||
return "IOCollada";
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> ColladaIOPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> ColladaIOPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("Collada File Format" ,tr("DAE"));
|
||||
@ -227,7 +229,7 @@ QList<MeshIOInterface::Format> ColladaIOPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> ColladaIOPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> ColladaIOPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("Collada File Format" ,tr("DAE"));
|
||||
|
||||
@ -44,13 +44,14 @@
|
||||
#define COLLADAIOPLUGIN_H
|
||||
|
||||
#include <QObject>
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
#include <common/meshmodel.h>
|
||||
|
||||
class ColladaIOPlugin : public QObject, public MeshIOInterface
|
||||
class ColladaIOPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
public:
|
||||
//std::map<MeshModel*,typename vcg::tri::io::InfoDAE*> _mp;
|
||||
|
||||
@ -71,7 +71,7 @@ QString IOMPlugin::pluginName() const
|
||||
return "IOCTM";
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> IOMPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> IOMPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("OpenCTM compressed format" ,tr("CTM"));
|
||||
@ -81,7 +81,7 @@ QList<MeshIOInterface::Format> IOMPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> IOMPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> IOMPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("OpenCTM compressed format" ,tr("CTM"));
|
||||
|
||||
@ -31,13 +31,14 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
#include <common/meshmodel.h>
|
||||
|
||||
class IOMPlugin : public QObject, public MeshIOInterface
|
||||
class IOMPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -150,7 +150,7 @@ QString ExpeIOPlugin::pluginName() const
|
||||
return "IOExpe";
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> ExpeIOPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> ExpeIOPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("Expe's point set (binary)" ,tr("pts"));
|
||||
@ -162,7 +162,7 @@ QList<MeshIOInterface::Format> ExpeIOPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> ExpeIOPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> ExpeIOPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
// formatList << Format("Expe's point set (binary)" ,tr("pts"));
|
||||
|
||||
@ -26,13 +26,14 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
#include <common/meshmodel.h>
|
||||
|
||||
class ExpeIOPlugin : public QObject, public MeshIOInterface
|
||||
class ExpeIOPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
#include <QString>
|
||||
#include <QFile>
|
||||
|
||||
JSONIOPlugin::JSONIOPlugin(void) : MeshIOInterface()
|
||||
JSONIOPlugin::JSONIOPlugin(void) : IOPluginInterface()
|
||||
{
|
||||
;
|
||||
}
|
||||
@ -426,7 +426,7 @@ bool JSONIOPlugin::save(const QString & formatName,const QString & fileName, Mes
|
||||
/*
|
||||
returns the list of the file's type which can be imported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> JSONIOPlugin::importFormats(void) const
|
||||
QList<IOPluginInterface::Format> JSONIOPlugin::importFormats(void) const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
//formatList << Format("JavaScript JSON", tr("JSON"));
|
||||
@ -436,7 +436,7 @@ QList<MeshIOInterface::Format> JSONIOPlugin::importFormats(void) const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> JSONIOPlugin::exportFormats(void) const
|
||||
QList<IOPluginInterface::Format> JSONIOPlugin::exportFormats(void) const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("JavaScript JSON", tr("JSON"));
|
||||
|
||||
@ -23,13 +23,14 @@
|
||||
#ifndef JSONIOPLUGIN_H
|
||||
#define JSONIOPLUGIN_H
|
||||
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
#include <common/meshmodel.h>
|
||||
|
||||
class JSONIOPlugin : public QObject, public MeshIOInterface
|
||||
class JSONIOPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ QString PDBIOPlugin::pluginName() const
|
||||
return "IOPDB";
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> PDBIOPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> PDBIOPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("Protein Data Bank" , tr("PDB"));
|
||||
@ -159,7 +159,7 @@ QList<MeshIOInterface::Format> PDBIOPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> PDBIOPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> PDBIOPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
// formatList << Format("Stanford Polygon File Format" , tr("PLY"));
|
||||
|
||||
@ -24,14 +24,14 @@
|
||||
#ifndef PDBIOPLUGIN_H
|
||||
#define PDBIOPLUGIN_H
|
||||
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
#include <common/meshmodel.h>
|
||||
|
||||
#include <common/interfaces.h>
|
||||
|
||||
class PDBIOPlugin : public QObject, public MeshIOInterface
|
||||
class PDBIOPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -87,7 +87,7 @@ QString TriIOPlugin::pluginName() const
|
||||
return "IOTRI";
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> TriIOPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> TriIOPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList
|
||||
@ -99,7 +99,7 @@ QList<MeshIOInterface::Format> TriIOPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> TriIOPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> TriIOPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
return formatList;
|
||||
|
||||
@ -31,13 +31,14 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
#include <common/meshmodel.h>
|
||||
|
||||
class TriIOPlugin : public QObject, public MeshIOInterface
|
||||
class TriIOPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -103,7 +103,7 @@ QString TxtIOPlugin::pluginName() const
|
||||
return "IOTXT";
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> TxtIOPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> TxtIOPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("TXT (Generic ASCII point list)", tr("TXT"));
|
||||
@ -114,7 +114,7 @@ QList<MeshIOInterface::Format> TxtIOPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> TxtIOPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> TxtIOPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
return formatList;
|
||||
|
||||
@ -25,13 +25,14 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
#include <common/meshmodel.h>
|
||||
|
||||
class TxtIOPlugin : public QObject, public MeshIOInterface
|
||||
class TxtIOPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -41,7 +41,7 @@ using namespace vcg;
|
||||
|
||||
|
||||
U3DIOPlugin::U3DIOPlugin()
|
||||
:QObject(),MeshIOInterface(),_param()
|
||||
:QObject(),IOPluginInterface(),_param()
|
||||
{
|
||||
|
||||
}
|
||||
@ -125,7 +125,7 @@ QString U3DIOPlugin::pluginName() const
|
||||
return "IOU3D";
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> U3DIOPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> U3DIOPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
return formatList;
|
||||
@ -134,7 +134,7 @@ QList<MeshIOInterface::Format> U3DIOPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> U3DIOPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> U3DIOPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("U3D File Format" ,tr("U3D"));
|
||||
|
||||
@ -28,15 +28,16 @@
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
#include <common/meshmodel.h>
|
||||
#include <wrap/io_trimesh/export_u3d.h>
|
||||
#include <wrap/io_trimesh/export_idtf.h>
|
||||
|
||||
class U3DIOPlugin : public QObject, public MeshIOInterface
|
||||
class U3DIOPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
public:
|
||||
QString pluginName() const;
|
||||
|
||||
@ -155,7 +155,7 @@ QString IoX3DPlugin::pluginName() const
|
||||
return "IOX3D";
|
||||
}
|
||||
|
||||
QList<MeshIOInterface::Format> IoX3DPlugin::importFormats() const
|
||||
QList<IOPluginInterface::Format> IoX3DPlugin::importFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("X3D File Format - XML encoding", tr("X3D"));
|
||||
@ -167,7 +167,7 @@ QList<MeshIOInterface::Format> IoX3DPlugin::importFormats() const
|
||||
/*
|
||||
returns the list of the file's type which can be exported
|
||||
*/
|
||||
QList<MeshIOInterface::Format> IoX3DPlugin::exportFormats() const
|
||||
QList<IOPluginInterface::Format> IoX3DPlugin::exportFormats() const
|
||||
{
|
||||
QList<Format> formatList;
|
||||
formatList << Format("X3D File Format", tr("X3D"));
|
||||
|
||||
@ -34,13 +34,14 @@
|
||||
|
||||
#include <QObject>
|
||||
|
||||
#include <common/interfaces.h>
|
||||
#include <common/interfaces/io_plugin_interface.h>
|
||||
#include <common/meshmodel.h>
|
||||
|
||||
class IoX3DPlugin : public QObject, public MeshIOInterface
|
||||
class IoX3DPlugin : public QObject, public IOPluginInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
MESHLAB_PLUGIN_IID_EXPORTER(MESH_IO_INTERFACE_IID)
|
||||
Q_INTERFACES(MeshIOInterface)
|
||||
Q_INTERFACES(IOPluginInterface)
|
||||
|
||||
|
||||
public:
|
||||
|
||||
@ -138,7 +138,7 @@ public:
|
||||
|
||||
// HashTable storing all supported formats together with
|
||||
// the (1-based) index of first plugin which is able to open it
|
||||
QHash<QString, MeshIOInterface*> allKnownFormats;
|
||||
QHash<QString, IOPluginInterface*> allKnownFormats;
|
||||
|
||||
//PM.LoadFormats(filters, allKnownFormats,PluginManager::IMPORT);
|
||||
|
||||
@ -150,7 +150,7 @@ public:
|
||||
QString extension = fi.suffix();
|
||||
qDebug("Opening a file with extension %s", qUtf8Printable(extension));
|
||||
// retrieving corresponding IO plugin
|
||||
MeshIOInterface* pCurrentIOPlugin = PM.allKnowInputFormats[extension.toLower()];
|
||||
IOPluginInterface* pCurrentIOPlugin = PM.allKnowInputFormats[extension.toLower()];
|
||||
if (pCurrentIOPlugin == 0)
|
||||
{
|
||||
fprintf(fp,"Error encountered while opening file: ");
|
||||
@ -215,7 +215,7 @@ public:
|
||||
QString extension = fi.suffix();
|
||||
|
||||
// retrieving corresponding IO plugin
|
||||
MeshIOInterface* pCurrentIOPlugin = PM.allKnowOutputFormats[extension.toLower()];
|
||||
IOPluginInterface* pCurrentIOPlugin = PM.allKnowOutputFormats[extension.toLower()];
|
||||
if (pCurrentIOPlugin == 0)
|
||||
{
|
||||
fprintf(fp,"Error encountered while opening file: ");
|
||||
@ -245,7 +245,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
bool loadMesh(const QString& fileName, MeshIOInterface *pCurrentIOPlugin, MeshModel* mm, int& mask,RichParameterList* prePar, const Matrix44m &mtr, MeshDocument* md, FILE* fp = stdout)
|
||||
bool loadMesh(const QString& fileName, IOPluginInterface *pCurrentIOPlugin, MeshModel* mm, int& mask,RichParameterList* prePar, const Matrix44m &mtr, MeshDocument* md, FILE* fp = stdout)
|
||||
{
|
||||
if (mm == NULL)
|
||||
return false;
|
||||
@ -380,7 +380,7 @@ public:
|
||||
mm->Clear();
|
||||
QFileInfo fi(fullPath);
|
||||
QString extension = fi.suffix();
|
||||
MeshIOInterface *pCurrentIOPlugin = PM.allKnowInputFormats[extension.toLower()];
|
||||
IOPluginInterface *pCurrentIOPlugin = PM.allKnowInputFormats[extension.toLower()];
|
||||
|
||||
if(pCurrentIOPlugin != NULL)
|
||||
{
|
||||
|
||||
2
vcglib
2
vcglib
@ -1 +1 @@
|
||||
Subproject commit d33a25db2dfc63d74d9c40a7f0bd40633c4b8142
|
||||
Subproject commit 94cc728ddb9774eee62b84bcb1fe1cf252e03841
|
||||
Loading…
x
Reference in New Issue
Block a user