diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 2280f76c4..69a205406 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -17,6 +17,8 @@ set(SOURCES mesh_data_structures/cmesh.cpp mesh_data_structures/mesh_document.cpp mesh_data_structures/mesh_model.cpp + mesh_data_structures/raster_model.cpp + mesh_data_structures/render_raster.cpp GLExtensionsManager.cpp GLLogStream.cpp filterscript.cpp @@ -44,6 +46,8 @@ set(HEADERS mesh_data_structures/cmesh.h mesh_data_structures/mesh_document.h mesh_data_structures/mesh_model.h + mesh_data_structures/raster_model.h + mesh_data_structures/render_raster.h GLExtensionsManager.h GLLogStream.h filterscript.h diff --git a/src/common/common.pro b/src/common/common.pro index d5ababf55..9f32b6ec0 100644 --- a/src/common/common.pro +++ b/src/common/common.pro @@ -56,6 +56,8 @@ HEADERS += \ mesh_data_structures/cmesh.h \ mesh_data_structures/mesh_model.h \ mesh_data_structures/mesh_document.h \ + mesh_data_structures/raster_model.h \ + mesh_data_structures/render_raster.h \ pluginmanager.h \ mlexception.h \ mlapplication.h \ @@ -77,6 +79,8 @@ SOURCES += \ mesh_data_structures/cmesh.cpp \ mesh_data_structures/mesh_model.cpp \ mesh_data_structures/mesh_document.cpp \ + mesh_data_structures/raster_model.cpp \ + mesh_data_structures/render_raster.cpp \ pluginmanager.cpp \ mlapplication.cpp \ searcher.cpp \ diff --git a/src/common/mesh_data_structures/mesh_document.cpp b/src/common/mesh_data_structures/mesh_document.cpp index b54d70b9b..bc25de589 100644 --- a/src/common/mesh_data_structures/mesh_document.cpp +++ b/src/common/mesh_data_structures/mesh_document.cpp @@ -67,6 +67,59 @@ QString NameDisambiguator(QList &elemList, QString meshLabel ) return newName; } +MeshDocumentStateData::MeshDocumentStateData() + :_lock(QReadWriteLock::Recursive) +{ + +} + +MeshDocumentStateData::~MeshDocumentStateData() +{ + QWriteLocker locker(&_lock); + _existingmeshesbeforeoperation.clear(); +} + +void MeshDocumentStateData::create(MeshDocument& md) +{ + QWriteLocker locker(&_lock); + for (int ii = 0; ii < md.meshList.size(); ++ii) + { + MeshModel* mm = md.meshList[ii]; + if (mm != NULL) + insert(mm->id(), MeshModelStateData(mm->dataMask(), mm->cm.VN(), mm->cm.FN(), mm->cm.EN())); + } +} + +QMap::iterator MeshDocumentStateData::insert(const int key, const MeshModelStateData & value) +{ + QWriteLocker locker(&_lock); + return _existingmeshesbeforeoperation.insert(key,value); +} + +QMap::iterator MeshDocumentStateData::find(const int key) +{ + QReadLocker locker(&_lock); + return _existingmeshesbeforeoperation.find(key); +} + +QMap::iterator MeshDocumentStateData::begin() +{ + QReadLocker locker(&_lock); + return _existingmeshesbeforeoperation.begin(); +} + +QMap::iterator MeshDocumentStateData::end() +{ + QReadLocker locker(&_lock); + return _existingmeshesbeforeoperation.end(); +} + +void MeshDocumentStateData::clear() +{ + QWriteLocker locker(&_lock); + _existingmeshesbeforeoperation.clear(); +} + MeshDocument::MeshDocument() { meshIdCounter=0; diff --git a/src/common/mesh_data_structures/mesh_document.h b/src/common/mesh_data_structures/mesh_document.h index 18920768d..c669f2e82 100644 --- a/src/common/mesh_data_structures/mesh_document.h +++ b/src/common/mesh_data_structures/mesh_document.h @@ -25,6 +25,25 @@ #define MESH_DOCUMENT_H #include "mesh_model.h" +#include "raster_model.h" + +class MeshDocumentStateData +{ +public: + MeshDocumentStateData(); + ~MeshDocumentStateData(); + + void create(MeshDocument& md); + QMap::iterator insert(const int key, const MeshModelStateData & value); + QMap::iterator find(const int key); + QMap::iterator begin(); + QMap::iterator end(); + void clear(); + +private: + mutable QReadWriteLock _lock; + QMap _existingmeshesbeforeoperation; +}; class MeshDocument : public QObject { diff --git a/src/common/mesh_data_structures/mesh_model.cpp b/src/common/mesh_data_structures/mesh_model.cpp index 35050f8a8..adbf7d484 100644 --- a/src/common/mesh_data_structures/mesh_model.cpp +++ b/src/common/mesh_data_structures/mesh_model.cpp @@ -132,63 +132,12 @@ int MeshModel::io2mm(int single_iobit) } ; } -Plane::Plane(const Plane& pl) -{ - semantic = pl.semantic; - fullPathFileName = pl.fullPathFileName; - image = QImage(pl.image); -} - -Plane::Plane(const QString& pathName, const int _semantic) -{ - semantic =_semantic; - fullPathFileName = pathName; - - image = QImage(pathName); -} - -RasterModel::RasterModel(MeshDocument *parent, QString _rasterName) -{ - _id=parent->newRasterId(); - par = parent; - this->_label= std::move(_rasterName); - visible=true; -} - -RasterModel::RasterModel() -{ - -} -MeshLabRenderRaster::MeshLabRenderRaster() -{ -} -MeshLabRenderRaster::MeshLabRenderRaster( const MeshLabRenderRaster& rm ) - :shot(rm.shot) -{ - for(QList::const_iterator it = rm.planeList.begin();it != rm.planeList.end();++it) - { - planeList.push_back(new Plane(**it)); - if (rm.currentPlane == *it) - currentPlane = planeList[planeList.size() - 1]; - } -} -void MeshLabRenderRaster::addPlane(Plane *plane) -{ - planeList.append(plane); - currentPlane = plane; -} -MeshLabRenderRaster::~MeshLabRenderRaster() -{ - currentPlane = NULL; - for(int ii = 0;ii < planeList.size();++ii) - delete planeList[ii]; -} void MeshModelState::create(int _mask, MeshModel* _m) { @@ -473,56 +422,3 @@ int MeshModel::dataMask() const { return currentDataMask; } - -MeshDocumentStateData::MeshDocumentStateData() - :_lock(QReadWriteLock::Recursive) -{ - -} - -MeshDocumentStateData::~MeshDocumentStateData() -{ - QWriteLocker locker(&_lock); - _existingmeshesbeforeoperation.clear(); -} - -void MeshDocumentStateData::create(MeshDocument& md) -{ - QWriteLocker locker(&_lock); - for (int ii = 0; ii < md.meshList.size(); ++ii) - { - MeshModel* mm = md.meshList[ii]; - if (mm != NULL) - insert(mm->id(), MeshModelStateData(mm->dataMask(), mm->cm.VN(), mm->cm.FN(), mm->cm.EN())); - } -} - -QMap::iterator MeshDocumentStateData::insert(const int key, const MeshModelStateData & value) -{ - QWriteLocker locker(&_lock); - return _existingmeshesbeforeoperation.insert(key,value); -} - -QMap::iterator MeshDocumentStateData::find(const int key) -{ - QReadLocker locker(&_lock); - return _existingmeshesbeforeoperation.find(key); -} - -QMap::iterator MeshDocumentStateData::begin() -{ - QReadLocker locker(&_lock); - return _existingmeshesbeforeoperation.begin(); -} - -QMap::iterator MeshDocumentStateData::end() -{ - QReadLocker locker(&_lock); - return _existingmeshesbeforeoperation.end(); -} - -void MeshDocumentStateData::clear() -{ - QWriteLocker locker(&_lock); - _existingmeshesbeforeoperation.clear(); -} diff --git a/src/common/mesh_data_structures/mesh_model.h b/src/common/mesh_data_structures/mesh_model.h index 628d91077..86c81800e 100644 --- a/src/common/mesh_data_structures/mesh_model.h +++ b/src/common/mesh_data_structures/mesh_model.h @@ -227,221 +227,6 @@ public: };// end class MeshModel -/* -Plane Class -the base class for a registered image that contains the path, the semantic and the data of the image -*/ - -class Plane -{ -public: - - enum PlaneSemantic - { - NONE = 0x0000, - RGBA = 0x0001, - MASK_UB = 0x0002, - MASK_F = 0x0004, - DEPTH_F = 0x0008, - EXTRA00_F = 0x0100, - EXTRA01_F = 0x0200, - EXTRA02_F = 0x0400, - EXTRA03_F = 0x0800, - EXTRA00_RGBA = 0x1000, - EXTRA01_RGBA = 0x2000, - EXTRA02_RGBA = 0x4000, - EXTRA03_RGBA = 0x8000 - }; - - int semantic; - QString fullPathFileName; - QImage image; - QImage thumb; - float *buf; - - bool IsInCore() { return !image.isNull(); } - void Load(); - void Discard(); //discard the loaded image freeing the mem. - - /// The whole full path name of the mesh - const QString fullName() const {return fullPathFileName;} - /// just the name of the file - const QString shortName() const { return QFileInfo(fullPathFileName).fileName(); } - - Plane(const Plane& pl); - Plane(const QString& pathName, const int _semantic); - -}; //end class Plane - - -class MeshLabRenderRaster -{ -public: - MeshLabRenderRaster(); - MeshLabRenderRaster(const MeshLabRenderRaster& rm); - ~MeshLabRenderRaster(); - - Shotm shot; - - ///The list of the registered images - QList planeList; - Plane *currentPlane; - - void addPlane(Plane * plane); -}; - -/* -RasterModel Class -The base class for keeping a set of "registered" images (e.g. images that can be projected onto a 3D space). -Each Raster model is composed by a list of registered images, each image with its own "semantic" (color, depth, normals, quality, masks) -and with all the images sharing the same shot. -*/ - -class RasterModel : public MeshLabRenderRaster -{ -public: - RasterModel(); - MeshDocument* par; - -private: - int _id; - QString _label; - -public: - bool visible; - inline int id() const {return _id;} - - RasterModel(MeshDocument *parent, QString _rasterName=QString()); - - void setLabel(QString newLabel) {_label = newLabel;} - - const QString label() const { - if(!_label.isEmpty()) return _label; - if(!planeList.empty()) return planeList.first()->shortName(); - return "Error!"; - } - - enum RasterElement - { - RM_NONE = 0x00000000, - RM_ALL = 0xffffffff - }; -};// end class RasterModel - -//class RenderMode -//{ -//private: -// QList declist; -// -//public: -// vcg::GLW::DrawMode drawMode; -// vcg::GLW::ColorMode colorMode; -// vcg::GLW::TextureMode textureMode; -// -// -// -// MLRenderingData::PRIMITIVE_MODALITY_MASK pmmask; -// MLRenderingData::RendAtts atts; -// -// bool lighting; -// bool backFaceCull; -// bool doubleSideLighting; -// bool fancyLighting; -// -// RenderMode(vcg::GLW::DrawMode dm) // :declist() -// { -// Init(); -// drawMode=dm; -// } -// -// RenderMode() { Init(); } -// -// void Init() -// { -// drawMode = vcg::GLW::DMSmooth; -// colorMode = vcg::GLW::CMNone; -// textureMode = vcg::GLW::TMNone; -// -// pmmask = MLRenderingData::PR_SOLID; -// atts = MLRenderingData::RendAtts(); -// atts[MLRenderingData::ATT_NAMES::ATT_VERTPOSITION] = true; -// atts[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL] = true; -// -// lighting = true; -// backFaceCull = false; -// doubleSideLighting = false; -// fancyLighting = false; -// } -// -// inline void addPrimitiveModality(MLRenderingData::PRIMITIVE_MODALITY addedpm) -// { -// pmmask = pmmask | addedpm; -// } -// -// inline void removePrimitiveModality(MLRenderingData::PRIMITIVE_MODALITY removedpm) -// { -// pmmask = pmmask & (~removedpm); -// } -// -// inline void setDrawMode(const vcg::GLW::DrawMode dm) -// { -// drawMode = dm; -// } -// -// inline void setColorMode(const vcg::GLW::ColorMode cm) -// { -// colorMode = cm; -// } -// -// inline void setTextureMode(const vcg::GLW::TextureMode tm) -// { -// textureMode = tm; -// } -// -// inline void setLighting(const bool ison) -// { -// lighting = ison; -// } -// -// inline void setBackFaceCull(const bool ison) -// { -// backFaceCull = ison; -// } -// -// inline void setDoubleFaceLighting(const bool ison) -// { -// doubleSideLighting = ison; -// } -// -// inline void setFancyLighting(const bool ison) -// { -// fancyLighting = ison; -// } -// -// inline QList& decoratorList() -// { -// return declist; -// } -// -// static RenderMode defaultRenderingAtts(); -//}; // end class RenderMode -//Q_DECLARE_METATYPE(RenderMode) - -//class RasterModelState : public QObject -//{ -// Q_OBJECT -//public: -// MeshLabRenderState(); -// ~MeshLabRenderState(); -// -//private: -// //for quickness I added a RasterModel, but should be something less. -// QMap _rendermap; -// QReadWriteLock _mutdoc; -//}; -//class FilterScript; - - struct MeshModelStateData { int _mask; @@ -454,24 +239,6 @@ struct MeshModelStateData {} }; -class MeshDocumentStateData -{ -public: - MeshDocumentStateData(); - ~MeshDocumentStateData(); - - void create(MeshDocument& md); - QMap::iterator insert(const int key, const MeshModelStateData & value); - QMap::iterator find(const int key); - QMap::iterator begin(); - QMap::iterator end(); - void clear(); - -private: - mutable QReadWriteLock _lock; - QMap _existingmeshesbeforeoperation; -}; - /* A class designed to save partial aspects of the state of a mesh, such as vertex colors, current selections, vertex positions diff --git a/src/common/mesh_data_structures/raster_model.cpp b/src/common/mesh_data_structures/raster_model.cpp new file mode 100644 index 000000000..f3c41bd56 --- /dev/null +++ b/src/common/mesh_data_structures/raster_model.cpp @@ -0,0 +1,39 @@ +/**************************************************************************** +* MeshLab o o * +* Visual and Computer Graphics Library o o * +* _ O _ * +* Copyright(C) 2004-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. * +* * +****************************************************************************/ + +#include "raster_model.h" + +#include "mesh_document.h" + +RasterModel::RasterModel(MeshDocument *parent, QString _rasterName) +{ + _id=parent->newRasterId(); + par = parent; + this->_label= std::move(_rasterName); + visible=true; +} + +RasterModel::RasterModel() +{ + +} diff --git a/src/common/mesh_data_structures/raster_model.h b/src/common/mesh_data_structures/raster_model.h new file mode 100644 index 000000000..94c233583 --- /dev/null +++ b/src/common/mesh_data_structures/raster_model.h @@ -0,0 +1,69 @@ +/**************************************************************************** +* MeshLab o o * +* Visual and Computer Graphics Library o o * +* _ O _ * +* Copyright(C) 2004-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 RASTER_MODEL_H +#define RASTER_MODEL_H + +#include "render_raster.h" + +class MeshDocument; + +/* +RasterModel Class +The base class for keeping a set of "registered" images (e.g. images that can be projected onto a 3D space). +Each Raster model is composed by a list of registered images, each image with its own "semantic" (color, depth, normals, quality, masks) +and with all the images sharing the same shot. +*/ + +class RasterModel : public MeshLabRenderRaster +{ +public: + RasterModel(); + MeshDocument* par; + +private: + int _id; + QString _label; + +public: + bool visible; + inline int id() const {return _id;} + + RasterModel(MeshDocument *parent, QString _rasterName=QString()); + + void setLabel(QString newLabel) {_label = newLabel;} + + const QString label() const { + if(!_label.isEmpty()) return _label; + if(!planeList.empty()) return planeList.first()->shortName(); + return "Error!"; + } + + enum RasterElement + { + RM_NONE = 0x00000000, + RM_ALL = 0xffffffff + }; +};// end class RasterModel + +#endif // RASTER_MODEL_H diff --git a/src/common/mesh_data_structures/render_raster.cpp b/src/common/mesh_data_structures/render_raster.cpp new file mode 100644 index 000000000..99de191f9 --- /dev/null +++ b/src/common/mesh_data_structures/render_raster.cpp @@ -0,0 +1,68 @@ +/**************************************************************************** +* MeshLab o o * +* Visual and Computer Graphics Library o o * +* _ O _ * +* Copyright(C) 2004-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. * +* * +****************************************************************************/ + +#include "render_raster.h" + +RasterPlane::RasterPlane(const RasterPlane& pl) +{ + semantic = pl.semantic; + fullPathFileName = pl.fullPathFileName; + image = QImage(pl.image); +} + +RasterPlane::RasterPlane(const QString& pathName, const int _semantic) +{ + semantic =_semantic; + fullPathFileName = pathName; + + image = QImage(pathName); +} + +MeshLabRenderRaster::MeshLabRenderRaster() +{ + +} + +MeshLabRenderRaster::MeshLabRenderRaster( const MeshLabRenderRaster& rm ) + :shot(rm.shot) +{ + for(QList::const_iterator it = rm.planeList.begin();it != rm.planeList.end();++it) + { + planeList.push_back(new RasterPlane(**it)); + if (rm.currentPlane == *it) + currentPlane = planeList[planeList.size() - 1]; + } +} + +void MeshLabRenderRaster::addPlane(RasterPlane *plane) +{ + planeList.append(plane); + currentPlane = plane; +} + +MeshLabRenderRaster::~MeshLabRenderRaster() +{ + currentPlane = NULL; + for(int ii = 0;ii < planeList.size();++ii) + delete planeList[ii]; +} diff --git a/src/common/mesh_data_structures/render_raster.h b/src/common/mesh_data_structures/render_raster.h new file mode 100644 index 000000000..9ab1cde26 --- /dev/null +++ b/src/common/mesh_data_structures/render_raster.h @@ -0,0 +1,95 @@ +/**************************************************************************** +* MeshLab o o * +* Visual and Computer Graphics Library o o * +* _ O _ * +* Copyright(C) 2004-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 RENDER_RASTER_H +#define RENDER_RASTER_H + +#include +#include +#include +#include "cmesh.h" + +/* +RasterPlane Class +the base class for a registered image that contains the path, the semantic and the data of the image +*/ + +class RasterPlane +{ +public: + + enum PlaneSemantic + { + NONE = 0x0000, + RGBA = 0x0001, + MASK_UB = 0x0002, + MASK_F = 0x0004, + DEPTH_F = 0x0008, + EXTRA00_F = 0x0100, + EXTRA01_F = 0x0200, + EXTRA02_F = 0x0400, + EXTRA03_F = 0x0800, + EXTRA00_RGBA = 0x1000, + EXTRA01_RGBA = 0x2000, + EXTRA02_RGBA = 0x4000, + EXTRA03_RGBA = 0x8000 + }; + + int semantic; + QString fullPathFileName; + QImage image; + QImage thumb; + float *buf; + + bool IsInCore() { return !image.isNull(); } + void Load(); + void Discard(); //discard the loaded image freeing the mem. + + /// The whole full path name of the mesh + const QString fullName() const {return fullPathFileName;} + /// just the name of the file + const QString shortName() const { return QFileInfo(fullPathFileName).fileName(); } + + RasterPlane(const RasterPlane& pl); + RasterPlane(const QString& pathName, const int _semantic); + +}; //end class Plane + +class MeshLabRenderRaster +{ +public: + MeshLabRenderRaster(); + MeshLabRenderRaster(const MeshLabRenderRaster& rm); + ~MeshLabRenderRaster(); + + Shotm shot; + + ///The list of the registered images + QList planeList; + RasterPlane *currentPlane; + + void addPlane(RasterPlane * plane); +}; + + +#endif // RENDER_RASTER_H diff --git a/src/common/meshlabdocumentbundler.cpp b/src/common/meshlabdocumentbundler.cpp index 89d7ed05d..834f5afa6 100644 --- a/src/common/meshlabdocumentbundler.cpp +++ b/src/common/meshlabdocumentbundler.cpp @@ -45,7 +45,7 @@ bool MeshDocumentFromBundler(MeshDocument &md, QString filename_out,QString imag { md.addNewRaster(); const QString fullpath_image_filename = image_filenames_q[int(i)]; - md.rm()->addPlane(new Plane(fullpath_image_filename,Plane::RGBA)); + md.rm()->addPlane(new RasterPlane(fullpath_image_filename,RasterPlane::RGBA)); int count=fullpath_image_filename.count('\\'); if (count==0) { @@ -83,7 +83,7 @@ bool MeshDocumentFromNvm(MeshDocument &md, QString filename_nvm, QString model_f for(size_t i=0 ; iaddPlane(new Plane(fullpath_image_filename,Plane::RGBA)); + md.rm()->addPlane(new RasterPlane(fullpath_image_filename,RasterPlane::RGBA)); md.rm()->setLabel(image_filenames_q[int(i)].section('/',1,2)); md.rm()->shot = shots[int(i)]; /*md.rm()->shot.Intrinsics.ViewportPx[0]=md.rm()->currentPlane->image.width(); diff --git a/src/common/meshlabdocumentxml.cpp b/src/common/meshlabdocumentxml.cpp index 097022d54..2f2bd1681 100644 --- a/src/common/meshlabdocumentxml.cpp +++ b/src/common/meshlabdocumentxml.cpp @@ -162,7 +162,7 @@ bool MeshDocumentFromXML(MeshDocument &md, QString filename, bool binary, std::m QFileInfo fi(filen); QString sem = el.attribute("semantic"); QString nm = fi.absoluteFilePath(); - md.rm()->addPlane(new Plane(fi.absoluteFilePath(), Plane::RGBA)); + md.rm()->addPlane(new RasterPlane(fi.absoluteFilePath(), RasterPlane::RGBA)); el = node.nextSiblingElement("Plane"); } raster = raster.nextSibling(); @@ -223,7 +223,7 @@ QDomElement RasterModelToXML(RasterModel *mp, QDomDocument &doc, bool binary) return rasterElem; } -QDomElement PlaneToXML(Plane* pl, const QString& basePath, QDomDocument& doc) +QDomElement PlaneToXML(RasterPlane* pl, const QString& basePath, QDomDocument& doc) { QDomElement planeElem = doc.createElement("Plane"); QDir dir(basePath); diff --git a/src/common/meshlabdocumentxml.h b/src/common/meshlabdocumentxml.h index d7b7328f1..f62c7fa34 100644 --- a/src/common/meshlabdocumentxml.h +++ b/src/common/meshlabdocumentxml.h @@ -12,5 +12,5 @@ QDomDocument MeshDocumentToXML(MeshDocument &md, bool onlyVisibleLayers, bool sa bool MeshDocumentToXMLFile(MeshDocument &md, QString filename, bool onlyVisibleLayers, bool saveViewState, bool binary, const std::map& rendOpt = std::map()); bool MeshDocumentFromXML(MeshDocument &md, QString filename, bool binary, std::map& rendOpt); QDomElement RasterModelToXML(RasterModel *mp,QDomDocument &doc, bool binary); -QDomElement PlaneToXML(Plane* pl,const QString& basePath,QDomDocument& doc); +QDomElement PlaneToXML(RasterPlane* pl,const QString& basePath,QDomDocument& doc); #endif // __MESHLABDOC_XML_H diff --git a/src/meshlab/mainwindow_RunTime.cpp b/src/meshlab/mainwindow_RunTime.cpp index 843377b86..32a5926e5 100644 --- a/src/meshlab/mainwindow_RunTime.cpp +++ b/src/meshlab/mainwindow_RunTime.cpp @@ -2014,7 +2014,7 @@ bool MainWindow::importRaster(const QString& fileImg) this->meshDoc()->setBusy(true); RasterModel *rm= meshDoc()->addNewRaster(); rm->setLabel(fileImg); - rm->addPlane(new Plane(fileName,Plane::RGBA)); + rm->addPlane(new RasterPlane(fileName,RasterPlane::RGBA)); meshDoc()->setBusy(false); showLayerDlg(true); diff --git a/src/meshlabplugins/decorate_raster_proj/decorate_raster_proj.h b/src/meshlabplugins/decorate_raster_proj/decorate_raster_proj.h index e98e777ff..bb25b3dd7 100644 --- a/src/meshlabplugins/decorate_raster_proj/decorate_raster_proj.h +++ b/src/meshlabplugins/decorate_raster_proj/decorate_raster_proj.h @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include diff --git a/src/meshlabplugins/filter_img_patch_param/Patch.h b/src/meshlabplugins/filter_img_patch_param/Patch.h index 6a200f052..a5365700a 100644 --- a/src/meshlabplugins/filter_img_patch_param/Patch.h +++ b/src/meshlabplugins/filter_img_patch_param/Patch.h @@ -27,7 +27,7 @@ -#include +#include struct TriangleUV diff --git a/src/meshlabplugins/filter_img_patch_param/VisibilityCheck.h b/src/meshlabplugins/filter_img_patch_param/VisibilityCheck.h index 0a1f0de36..8485125da 100644 --- a/src/meshlabplugins/filter_img_patch_param/VisibilityCheck.h +++ b/src/meshlabplugins/filter_img_patch_param/VisibilityCheck.h @@ -27,7 +27,8 @@ -#include +#include +#include #include #define USE_VBO diff --git a/src/meshlabplugins/filter_img_patch_param/VisibleSet.h b/src/meshlabplugins/filter_img_patch_param/VisibleSet.h index 3c34991b4..8784f8a60 100644 --- a/src/meshlabplugins/filter_img_patch_param/VisibleSet.h +++ b/src/meshlabplugins/filter_img_patch_param/VisibleSet.h @@ -27,7 +27,8 @@ -#include +#include +#include #include