mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-16 17:44:36 +00:00
- added first support for the basic decorators included inside the MeshLab core (just boundary...soon others will be added)
This commit is contained in:
parent
8ad5a18483
commit
943a6e5452
@ -495,7 +495,7 @@ public:
|
||||
|
||||
virtual bool startDecorate(QAction *, MeshDocument &, RichParameterSet *, GLArea *) {return false;}
|
||||
virtual bool startDecorate(QAction *, MeshModel &, RichParameterSet *, GLArea *) {return false;}
|
||||
virtual void decorateMesh(QAction *, MeshModel &, RichParameterSet *,QPainter *, GLLogStream &) = 0;
|
||||
virtual void decorateMesh(QAction *, MeshModel &, RichParameterSet *,GLArea *, QPainter *, GLLogStream &) = 0;
|
||||
virtual void decorateDoc(QAction *, MeshDocument &, RichParameterSet *, GLArea *, QPainter *, GLLogStream &) = 0;
|
||||
virtual void endDecorate(QAction *, MeshModel &, RichParameterSet *, GLArea *){}
|
||||
virtual void endDecorate(QAction *, MeshDocument &, RichParameterSet *, GLArea *){}
|
||||
|
||||
@ -657,6 +657,13 @@ void MLPoliciesStandAloneFunctions::setAttributePriorities(MLRenderingData::Rend
|
||||
atts[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE] &= !(atts[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE]);
|
||||
}
|
||||
|
||||
//void MLPoliciesStandAloneFunctions::setPerViewRenderingDataPriorities( MeshModel* mm,MLRenderingData& dt )
|
||||
//{
|
||||
// if (mm == NULL)
|
||||
// return;
|
||||
//
|
||||
//}
|
||||
|
||||
void MLPoliciesStandAloneFunctions::setPerViewGLOptionsPriorities(MeshModel* mm,MLRenderingData& dt )
|
||||
{
|
||||
if (mm == NULL)
|
||||
|
||||
@ -44,7 +44,8 @@ struct MLPerViewGLOptions : public vcg::RenderingModalityGLOptions
|
||||
/*****************************/
|
||||
|
||||
bool _peredge_extra_enabled;
|
||||
bool _peredge_boundary_enabled;
|
||||
bool _peredge_edgeboundary_enabled;
|
||||
bool _peredge_faceboundary_enabled;
|
||||
bool _peredge_edgemanifold_enabled;
|
||||
bool _peredge_vertmanifold_enabled;
|
||||
bool _peredge_text_boundary_enabled;
|
||||
@ -71,9 +72,10 @@ struct MLPerViewGLOptions : public vcg::RenderingModalityGLOptions
|
||||
{
|
||||
_visible = true;
|
||||
_peredge_extra_enabled = false;
|
||||
_peredge_boundary_enabled = true;
|
||||
_peredge_edgemanifold_enabled = true;
|
||||
_peredge_vertmanifold_enabled = true;
|
||||
_peredge_edgeboundary_enabled = false;
|
||||
_peredge_faceboundary_enabled = false;
|
||||
_peredge_edgemanifold_enabled = false;
|
||||
_peredge_vertmanifold_enabled = false;
|
||||
_peredge_text_boundary_enabled = false;
|
||||
_back_face_cull = false;
|
||||
_double_side_lighting = false;
|
||||
@ -112,7 +114,8 @@ private:
|
||||
{
|
||||
_visible = opts._visible;
|
||||
_peredge_extra_enabled = opts._peredge_extra_enabled;
|
||||
_peredge_boundary_enabled = opts._peredge_boundary_enabled;
|
||||
_peredge_edgeboundary_enabled = opts._peredge_edgeboundary_enabled;
|
||||
_peredge_faceboundary_enabled = opts._peredge_faceboundary_enabled;
|
||||
_peredge_edgemanifold_enabled = opts._peredge_edgemanifold_enabled;
|
||||
_peredge_vertmanifold_enabled = opts._peredge_vertmanifold_enabled;
|
||||
_peredge_text_boundary_enabled = opts._peredge_text_boundary_enabled;
|
||||
@ -184,6 +187,8 @@ struct MLPoliciesStandAloneFunctions
|
||||
|
||||
static void setPerViewGLOptionsPriorities(MeshModel* mm,MLRenderingData& dt );
|
||||
|
||||
//static void setPerViewRenderingDataPriorities(MeshModel* mm,MLRenderingData& dt);
|
||||
|
||||
static void suggestedDefaultPerViewGLOptions(MLPerViewGLOptions& tmp);
|
||||
|
||||
static void suggestedDefaultPerViewRenderingData(MeshModel* meshmodel,MLRenderingData& dt);
|
||||
@ -224,6 +229,8 @@ public:
|
||||
//and the 'meaningful' gl parameters used by the rendering system
|
||||
typedef QMap<int,MLRenderingData> PerMeshRenderingDataMap;
|
||||
|
||||
MeshDocument& meshDoc() {return _md;}
|
||||
|
||||
void initializeGL();
|
||||
void deAllocateGPUSharedData();
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@
|
||||
#include "glarea.h"
|
||||
#include "mainwindow.h"
|
||||
#include "multiViewer_Container.h"
|
||||
#include "ml_default_decorators.h"
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QClipboard>
|
||||
@ -414,12 +415,14 @@ int GLArea::RenderForSelection(int pickX, int pickY)
|
||||
|
||||
void GLArea::paintEvent(QPaintEvent* /*event*/)
|
||||
{
|
||||
if (mvc() == NULL) return;
|
||||
if (mvc() == NULL)
|
||||
return;
|
||||
QPainter painter(this);
|
||||
painter.beginNativePainting();
|
||||
makeCurrent();
|
||||
|
||||
if(!isValid() ) return;
|
||||
if(!isValid())
|
||||
return;
|
||||
|
||||
QTime time;
|
||||
time.start();
|
||||
@ -464,16 +467,23 @@ void GLArea::paintEvent(QPaintEvent* /*event*/)
|
||||
shared->getRenderInfoPerMeshView(context(),dt);
|
||||
|
||||
iRenderer->Render(currentShader, *this->md(), dt, this);
|
||||
|
||||
|
||||
MLDefaultMeshDecorators defdec;
|
||||
|
||||
foreach(MeshModel * mp, this->md()->meshList)
|
||||
{
|
||||
if (mp->visible)
|
||||
if ((mp != NULL) && (mp->visible))
|
||||
{
|
||||
QList<QAction *>& tmpset = iPerMeshDecoratorsListMap[mp->id()];
|
||||
for( QList<QAction *>::iterator it = tmpset.begin(); it != tmpset.end();++it)
|
||||
{
|
||||
MeshDecorateInterface * decorInterface = qobject_cast<MeshDecorateInterface *>((*it)->parent());
|
||||
decorInterface->decorateMesh(*it,*mp,this->glas.currentGlobalParamSet,&painter,md()->Log);
|
||||
decorInterface->decorateMesh(*it,*mp,this->glas.currentGlobalParamSet,this,&painter,md()->Log);
|
||||
}
|
||||
MLRenderingData meshdt;
|
||||
shared->getRenderInfoPerMeshView(mp->id(),context(),meshdt);
|
||||
defdec.decorateMesh(*mp,meshdt,&painter,md()->Log);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -506,15 +516,6 @@ void GLArea::paintEvent(QPaintEvent* /*event*/)
|
||||
throw MLException(QString("GLArea: invalid MLPerViewGLOptions"));
|
||||
setLightingColors(opts);
|
||||
|
||||
//union of all the attributes requested at least by a modality rendering
|
||||
MLRenderingData::RendAtts unionatts;
|
||||
for(int pm = 0;pm < (int)MLRenderingData::PR_ARITY;++pm)
|
||||
{
|
||||
MLRenderingData::RendAtts tmp;
|
||||
if (curr.get(MLRenderingData::PRIMITIVE_MODALITY(pm),tmp) == false)
|
||||
throw MLException(QString("GLArea: invalid PRIMITIVE_MODALITY"));
|
||||
unionatts = MLRenderingData::RendAtts::unionSet(unionatts,tmp);
|
||||
}
|
||||
|
||||
if(opts._back_face_cull)
|
||||
glEnable(GL_CULL_FACE);
|
||||
@ -529,8 +530,12 @@ void GLArea::paintEvent(QPaintEvent* /*event*/)
|
||||
for( QList<QAction *>::iterator it = tmpset.begin(); it != tmpset.end();++it)
|
||||
{
|
||||
MeshDecorateInterface * decorInterface = qobject_cast<MeshDecorateInterface *>((*it)->parent());
|
||||
decorInterface->decorateMesh(*it,*mp,this->glas.currentGlobalParamSet, &painter,md()->Log);
|
||||
decorInterface->decorateMesh(*it,*mp,this->glas.currentGlobalParamSet,this,&painter,md()->Log);
|
||||
}
|
||||
|
||||
MLDefaultMeshDecorators defdec;
|
||||
datacont->getRenderInfoPerMeshView(mp->id(),context(),curr);
|
||||
defdec.decorateMesh(*mp,curr,&painter,md()->Log);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -970,7 +975,11 @@ void GLArea::manageCurrentMeshChange()
|
||||
/// Note that it is rather inefficient. Such work should be done only once for each decorator.
|
||||
void GLArea::updateAllPerMeshDecorators()
|
||||
{
|
||||
MeshDocument* mdoc = md();
|
||||
if (mdoc == NULL)
|
||||
return;
|
||||
makeCurrent();
|
||||
|
||||
for (QMap<int, QList<QAction *> >::iterator i = iPerMeshDecoratorsListMap.begin(); i != iPerMeshDecoratorsListMap.end(); ++i )
|
||||
{
|
||||
|
||||
@ -983,6 +992,23 @@ void GLArea::updateAllPerMeshDecorators()
|
||||
decorInterface->startDecorate(p,*m, this->glas.currentGlobalParamSet,this);
|
||||
}
|
||||
}
|
||||
|
||||
MultiViewer_Container* viewcont = mvc();
|
||||
if (viewcont == NULL)
|
||||
return;
|
||||
|
||||
MLSceneGLSharedDataContext* shared = viewcont->sharedDataContext();
|
||||
if (shared == NULL)
|
||||
return;
|
||||
|
||||
MLDefaultMeshDecorators defdec;
|
||||
for(MeshModel* mm = mdoc->nextMesh();mm != NULL;mm = mdoc->nextMesh(mm))
|
||||
{
|
||||
MLRenderingData dt;
|
||||
shared->getRenderInfoPerMeshView(mm->id(),context(),dt);
|
||||
defdec.cleanMeshDecorationData(*mm,dt);
|
||||
defdec.initMeshDecorationData(*mm,dt);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -817,29 +817,14 @@ void LayerDialog::updateRenderingDataAccordingToActions(int meshid,const QList<M
|
||||
{
|
||||
if (mw == NULL)
|
||||
return;
|
||||
MLRenderingData dt;
|
||||
mw->getRenderingData(meshid,dt);
|
||||
foreach(MLRenderingAction* act,acts)
|
||||
{
|
||||
if (act != NULL)
|
||||
act->updateRenderingData(dt);
|
||||
}
|
||||
mw->setRenderingData(meshid,dt);
|
||||
mw->GLA()->update();
|
||||
mw->updateRenderingDataAccordingToActions(meshid,acts);
|
||||
}
|
||||
|
||||
void LayerDialog::updateRenderingDataAccordingToAction( int meshid,MLRenderingAction* act)
|
||||
{
|
||||
if (mw == NULL)
|
||||
return;
|
||||
MLRenderingData dt;
|
||||
mw->getRenderingData(meshid,dt);
|
||||
|
||||
if (act != NULL)
|
||||
act->updateRenderingData(dt);
|
||||
|
||||
mw->setRenderingData(meshid,dt);
|
||||
mw->GLA()->update();
|
||||
mw->updateRenderingDataAccordingToAction(meshid,act);
|
||||
}
|
||||
|
||||
MeshTreeWidgetItem::MeshTreeWidgetItem(MeshModel* meshmodel,QTreeWidget* tree,MLRenderingToolbar* rendertoolbar)
|
||||
|
||||
@ -142,6 +142,9 @@ public:
|
||||
void defaultPerViewRenderingData(MLRenderingData& dt) const;
|
||||
void getRenderingData(int mid,MLRenderingData& dt) const;
|
||||
void setRenderingData(int mid,const MLRenderingData& dt);
|
||||
|
||||
void updateRenderingDataAccordingToActions(int meshid,const QList<MLRenderingAction*>& acts);
|
||||
void updateRenderingDataAccordingToAction( int meshid,MLRenderingAction* act);
|
||||
private slots:
|
||||
//////////// Slot Menu File //////////////////////
|
||||
void reload();
|
||||
|
||||
@ -34,6 +34,7 @@
|
||||
#include <exception>
|
||||
#include "xmlgeneratorgui.h"
|
||||
#include "filterthread.h"
|
||||
#include "ml_default_decorators.h"
|
||||
|
||||
#include <QToolBar>
|
||||
#include <QToolTip>
|
||||
@ -3366,3 +3367,42 @@ void MainWindow::addRenderingSystemLogInfo(unsigned mmid)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateRenderingDataAccordingToActions(int meshid,const QList<MLRenderingAction*>& acts)
|
||||
{
|
||||
MLRenderingData olddt;
|
||||
getRenderingData(meshid,olddt);
|
||||
MLRenderingData dt(olddt);
|
||||
foreach(MLRenderingAction* act,acts)
|
||||
{
|
||||
if (act != NULL)
|
||||
act->updateRenderingData(dt);
|
||||
}
|
||||
setRenderingData(meshid,dt);
|
||||
MeshModel* mm = meshDoc()->getMesh(meshid);
|
||||
if (mm != NULL)
|
||||
{
|
||||
MLDefaultMeshDecorators dec;
|
||||
dec.updateMeshDecorationData(*mm,olddt,dt);
|
||||
}
|
||||
GLA()->update();
|
||||
}
|
||||
|
||||
void MainWindow::updateRenderingDataAccordingToAction( int meshid,MLRenderingAction* act)
|
||||
{
|
||||
MLRenderingData olddt;
|
||||
getRenderingData(meshid,olddt);
|
||||
MLRenderingData dt(olddt);
|
||||
|
||||
if (act != NULL)
|
||||
act->updateRenderingData(dt);
|
||||
|
||||
setRenderingData(meshid,dt);
|
||||
MeshModel* mm = meshDoc()->getMesh(meshid);
|
||||
if (mm != NULL)
|
||||
{
|
||||
MLDefaultMeshDecorators dec;
|
||||
dec.updateMeshDecorationData(*mm,olddt,dt);
|
||||
}
|
||||
GLA()->update();
|
||||
}
|
||||
@ -33,6 +33,7 @@ HEADERS = ../common/interfaces.h \
|
||||
snapshotsetting.h \
|
||||
ml_render_gui.h \
|
||||
ml_rendering_actions.h \
|
||||
ml_default_decorators.h \
|
||||
$$VCGDIR/wrap/gui/trackball.h \
|
||||
$$VCGDIR/wrap/gui/trackmode.h \
|
||||
$$VCGDIR/wrap/gl/trimesh.h \
|
||||
@ -55,6 +56,7 @@ SOURCES = main.cpp \
|
||||
xmlgeneratorgui.cpp \
|
||||
ml_render_gui.cpp \
|
||||
ml_rendering_actions.cpp \
|
||||
ml_default_decorators.cpp \
|
||||
$$VCGDIR/wrap/gui/trackball.cpp \
|
||||
$$VCGDIR/wrap/gui/trackmode.cpp \
|
||||
#$$GLEWDIR/src/glew.c \
|
||||
|
||||
@ -198,7 +198,7 @@ MLRenderingParametersFrame* MLRenderingParametersFrame::factory( MLRenderingActi
|
||||
return new MLRenderingBBoxParametersFrame(meshid,parent);
|
||||
|
||||
if (qobject_cast<MLRenderingEdgeDecoratorAction*>(act) != NULL)
|
||||
return new MLRenderingEdgeDecoratorParametersFrame(meshid,parent);
|
||||
return new MLRenderingDefaultDecoratorParametersFrame(meshid,parent);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -577,87 +577,99 @@ void MLRenderingBBoxParametersFrame::initGui()
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
MLRenderingEdgeDecoratorParametersFrame::MLRenderingEdgeDecoratorParametersFrame( QWidget* parent )
|
||||
MLRenderingDefaultDecoratorParametersFrame::MLRenderingDefaultDecoratorParametersFrame( QWidget* parent )
|
||||
:MLRenderingParametersFrame(-1,parent)
|
||||
{
|
||||
initGui();
|
||||
}
|
||||
|
||||
MLRenderingEdgeDecoratorParametersFrame::MLRenderingEdgeDecoratorParametersFrame( int meshid,QWidget* parent )
|
||||
MLRenderingDefaultDecoratorParametersFrame::MLRenderingDefaultDecoratorParametersFrame( int meshid,QWidget* parent )
|
||||
:MLRenderingParametersFrame(meshid,parent)
|
||||
{
|
||||
initGui();
|
||||
}
|
||||
|
||||
MLRenderingEdgeDecoratorParametersFrame::~MLRenderingEdgeDecoratorParametersFrame()
|
||||
MLRenderingDefaultDecoratorParametersFrame::~MLRenderingDefaultDecoratorParametersFrame()
|
||||
{
|
||||
delete _boundarytool;
|
||||
delete _boundearyedgetool;
|
||||
delete _boundearyfacetool;
|
||||
delete _edgemanifoldtool;
|
||||
delete _vertmanifoldtool;
|
||||
delete _texturebordertool;
|
||||
}
|
||||
|
||||
void MLRenderingEdgeDecoratorParametersFrame::getCurrentRenderingDataAccordingToGUI( MLRenderingData& dt ) const
|
||||
void MLRenderingDefaultDecoratorParametersFrame::getCurrentRenderingDataAccordingToGUI( MLRenderingData& dt ) const
|
||||
{
|
||||
_boundarytool->getRenderingDataAccordingToGUI(dt);
|
||||
_boundearyedgetool->getRenderingDataAccordingToGUI(dt);
|
||||
_boundearyfacetool->getRenderingDataAccordingToGUI(dt);
|
||||
_edgemanifoldtool->getRenderingDataAccordingToGUI(dt);
|
||||
_vertmanifoldtool->getRenderingDataAccordingToGUI(dt);
|
||||
_texturebordertool->getRenderingDataAccordingToGUI(dt);
|
||||
}
|
||||
|
||||
|
||||
void MLRenderingEdgeDecoratorParametersFrame::setPrimitiveButtonStatesAccordingToRenderingData( const MLRenderingData& dt )
|
||||
void MLRenderingDefaultDecoratorParametersFrame::setPrimitiveButtonStatesAccordingToRenderingData( const MLRenderingData& dt )
|
||||
{
|
||||
_boundarytool->setAccordingToRenderingData(dt);
|
||||
_boundearyedgetool->setAccordingToRenderingData(dt);
|
||||
_boundearyfacetool->setAccordingToRenderingData(dt);
|
||||
_edgemanifoldtool->setAccordingToRenderingData(dt);
|
||||
_vertmanifoldtool->setAccordingToRenderingData(dt);
|
||||
_texturebordertool->setAccordingToRenderingData(dt);
|
||||
}
|
||||
|
||||
void MLRenderingEdgeDecoratorParametersFrame::setAssociatedMeshId( int meshid )
|
||||
void MLRenderingDefaultDecoratorParametersFrame::setAssociatedMeshId( int meshid )
|
||||
{
|
||||
_boundarytool->setAssociatedMeshId(meshid);
|
||||
_boundearyedgetool->setAssociatedMeshId(meshid);
|
||||
_boundearyfacetool->setAssociatedMeshId(meshid);
|
||||
_edgemanifoldtool->setAssociatedMeshId(meshid);
|
||||
_vertmanifoldtool->setAssociatedMeshId(meshid);
|
||||
_texturebordertool->setAssociatedMeshId(meshid);
|
||||
}
|
||||
|
||||
void MLRenderingEdgeDecoratorParametersFrame::initGui()
|
||||
void MLRenderingDefaultDecoratorParametersFrame::initGui()
|
||||
{
|
||||
setAutoFillBackground(true);
|
||||
QGridLayout* layout = new QGridLayout();
|
||||
QLabel* boundarylab = new QLabel("Boundary",this);
|
||||
QLabel* boundarylab = new QLabel("Boundary Edges",this);
|
||||
QFont boldfont;
|
||||
boldfont.setBold(true);
|
||||
boundarylab->setFont(boldfont);
|
||||
layout->addWidget(boundarylab,0,0,Qt::AlignLeft);
|
||||
_boundarytool = new MLRenderingOnOffToolbar(_meshid,this);
|
||||
_boundarytool->setRenderingAction(new MLRenderingBoundaryAction(_meshid,_boundarytool));
|
||||
layout->addWidget(_boundarytool,0,1,Qt::AlignLeft);
|
||||
connect(_boundarytool,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)),this,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)));
|
||||
_boundearyedgetool = new MLRenderingOnOffToolbar(_meshid,this);
|
||||
_boundearyedgetool->setRenderingAction(new MLRenderingEdgeBoundaryAction(_meshid,_boundearyedgetool));
|
||||
layout->addWidget(_boundearyedgetool,0,1,Qt::AlignLeft);
|
||||
connect(_boundearyedgetool,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)),this,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)));
|
||||
|
||||
QLabel* boundaryfacelab = new QLabel("Boundary Faces",this);
|
||||
boundaryfacelab->setFont(boldfont);
|
||||
layout->addWidget(boundaryfacelab,1,0,Qt::AlignLeft);
|
||||
_boundearyfacetool = new MLRenderingOnOffToolbar(_meshid,this);
|
||||
_boundearyfacetool->setRenderingAction(new MLRenderingFaceBoundaryAction(_meshid,_boundearyfacetool));
|
||||
layout->addWidget(_boundearyfacetool,1,1,Qt::AlignLeft);
|
||||
connect(_boundearyfacetool,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)),this,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)));
|
||||
|
||||
QLabel* vertmanifoldlab = new QLabel("No-Manif Verts",this);
|
||||
vertmanifoldlab->setFont(boldfont);
|
||||
layout->addWidget(vertmanifoldlab,1,0,Qt::AlignLeft);
|
||||
layout->addWidget(vertmanifoldlab,2,0,Qt::AlignLeft);
|
||||
_vertmanifoldtool = new MLRenderingOnOffToolbar(_meshid,this);
|
||||
_vertmanifoldtool->setRenderingAction(new MLRenderingVertManifoldAction(_meshid,_vertmanifoldtool));
|
||||
layout->addWidget(_vertmanifoldtool,1,1,Qt::AlignLeft);
|
||||
layout->addWidget(_vertmanifoldtool,2,1,Qt::AlignLeft);
|
||||
connect(_vertmanifoldtool,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)),this,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)));
|
||||
|
||||
QLabel* edgemanifoldlab = new QLabel("No-Manif Edges",this);
|
||||
edgemanifoldlab->setFont(boldfont);
|
||||
layout->addWidget(edgemanifoldlab,2,0,Qt::AlignLeft);
|
||||
layout->addWidget(edgemanifoldlab,3,0,Qt::AlignLeft);
|
||||
_edgemanifoldtool = new MLRenderingOnOffToolbar(_meshid,this);
|
||||
_edgemanifoldtool->setRenderingAction(new MLRenderingEdgeManifoldAction(_meshid,_edgemanifoldtool));
|
||||
layout->addWidget(_edgemanifoldtool,2,1,Qt::AlignLeft);
|
||||
layout->addWidget(_edgemanifoldtool,3,1,Qt::AlignLeft);
|
||||
connect(_edgemanifoldtool,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)),this,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)));
|
||||
|
||||
QLabel* textureborderlab = new QLabel("Texture Border",this);
|
||||
textureborderlab->setFont(boldfont);
|
||||
layout->addWidget(textureborderlab,3,0,Qt::AlignLeft);
|
||||
layout->addWidget(textureborderlab,4,0,Qt::AlignLeft);
|
||||
_texturebordertool = new MLRenderingOnOffToolbar(_meshid,this);
|
||||
_texturebordertool->setRenderingAction(new MLRenderingTexBorderAction(_meshid,_texturebordertool));
|
||||
layout->addWidget(_texturebordertool,3,1,Qt::AlignLeft);
|
||||
layout->addWidget(_texturebordertool,4,1,Qt::AlignLeft);
|
||||
connect(_texturebordertool,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)),this,SIGNAL(updateRenderingDataAccordingToAction(int,MLRenderingAction*)));
|
||||
|
||||
setMinimumSize(layout->sizeHint());
|
||||
|
||||
@ -282,20 +282,21 @@ private:
|
||||
MLRenderingOnOffToolbar* _faceseltool;
|
||||
};
|
||||
|
||||
class MLRenderingEdgeDecoratorParametersFrame : public MLRenderingParametersFrame
|
||||
class MLRenderingDefaultDecoratorParametersFrame : public MLRenderingParametersFrame
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MLRenderingEdgeDecoratorParametersFrame(QWidget* parent);
|
||||
MLRenderingEdgeDecoratorParametersFrame(int meshid,QWidget* parent);
|
||||
~MLRenderingEdgeDecoratorParametersFrame();
|
||||
MLRenderingDefaultDecoratorParametersFrame(QWidget* parent);
|
||||
MLRenderingDefaultDecoratorParametersFrame(int meshid,QWidget* parent);
|
||||
~MLRenderingDefaultDecoratorParametersFrame();
|
||||
void setPrimitiveButtonStatesAccordingToRenderingData(const MLRenderingData& dt);
|
||||
void setAssociatedMeshId(int meshid);
|
||||
void getCurrentRenderingDataAccordingToGUI(MLRenderingData& dt) const;
|
||||
|
||||
private:
|
||||
void initGui();
|
||||
MLRenderingOnOffToolbar* _boundarytool;
|
||||
MLRenderingOnOffToolbar* _boundearyedgetool;
|
||||
MLRenderingOnOffToolbar* _boundearyfacetool;
|
||||
MLRenderingOnOffToolbar* _vertmanifoldtool;
|
||||
MLRenderingOnOffToolbar* _edgemanifoldtool;
|
||||
MLRenderingOnOffToolbar* _texturebordertool;
|
||||
|
||||
@ -900,35 +900,67 @@ bool MLRenderingEdgeDecoratorAction::isRenderingDataEnabled( const MLRenderingDa
|
||||
return false;
|
||||
}
|
||||
|
||||
MLRenderingBoundaryAction::MLRenderingBoundaryAction( QObject* parent )
|
||||
MLRenderingEdgeBoundaryAction::MLRenderingEdgeBoundaryAction( QObject* parent )
|
||||
:MLRenderingAction(-1,parent)
|
||||
{
|
||||
setText("Boundary");
|
||||
setText("Edges Boundary");
|
||||
}
|
||||
|
||||
MLRenderingBoundaryAction::MLRenderingBoundaryAction( int meshid,QObject* parent )
|
||||
MLRenderingEdgeBoundaryAction::MLRenderingEdgeBoundaryAction( int meshid,QObject* parent )
|
||||
:MLRenderingAction(meshid,parent)
|
||||
{
|
||||
setText("Boundary");
|
||||
setText("Edges Boundary");
|
||||
}
|
||||
|
||||
void MLRenderingBoundaryAction::updateRenderingData( MLRenderingData& rd )
|
||||
void MLRenderingEdgeBoundaryAction::updateRenderingData( MLRenderingData& rd )
|
||||
{
|
||||
MLPerViewGLOptions opts;
|
||||
bool valid = rd.get(opts);
|
||||
if (valid)
|
||||
{
|
||||
opts._peredge_boundary_enabled = isChecked();
|
||||
opts._peredge_edgeboundary_enabled = isChecked();
|
||||
rd.set(opts);
|
||||
}
|
||||
}
|
||||
|
||||
bool MLRenderingBoundaryAction::isRenderingDataEnabled( const MLRenderingData& rd ) const
|
||||
bool MLRenderingEdgeBoundaryAction::isRenderingDataEnabled( const MLRenderingData& rd ) const
|
||||
{
|
||||
MLPerViewGLOptions opts;
|
||||
bool valid = rd.get(opts);
|
||||
if (valid)
|
||||
return opts._peredge_boundary_enabled;
|
||||
return opts._peredge_edgeboundary_enabled;
|
||||
return false;
|
||||
}
|
||||
|
||||
MLRenderingFaceBoundaryAction::MLRenderingFaceBoundaryAction( QObject* parent )
|
||||
:MLRenderingAction(-1,parent)
|
||||
{
|
||||
setText("Faces Boundary");
|
||||
}
|
||||
|
||||
MLRenderingFaceBoundaryAction::MLRenderingFaceBoundaryAction( int meshid,QObject* parent )
|
||||
:MLRenderingAction(meshid,parent)
|
||||
{
|
||||
setText("Faces Boundary");
|
||||
}
|
||||
|
||||
void MLRenderingFaceBoundaryAction::updateRenderingData( MLRenderingData& rd )
|
||||
{
|
||||
MLPerViewGLOptions opts;
|
||||
bool valid = rd.get(opts);
|
||||
if (valid)
|
||||
{
|
||||
opts._peredge_faceboundary_enabled = isChecked();
|
||||
rd.set(opts);
|
||||
}
|
||||
}
|
||||
|
||||
bool MLRenderingFaceBoundaryAction::isRenderingDataEnabled( const MLRenderingData& rd ) const
|
||||
{
|
||||
MLPerViewGLOptions opts;
|
||||
bool valid = rd.get(opts);
|
||||
if (valid)
|
||||
return opts._peredge_faceboundary_enabled;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1150,4 +1182,6 @@ MLRenderingFloatAction::MLRenderingFloatAction(int meshid, QObject* parent )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -367,12 +367,23 @@ public:
|
||||
bool isRenderingDataEnabled(const MLRenderingData& rd) const;
|
||||
};
|
||||
|
||||
class MLRenderingBoundaryAction : public MLRenderingAction
|
||||
class MLRenderingEdgeBoundaryAction : public MLRenderingAction
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MLRenderingBoundaryAction(QObject* parent);
|
||||
MLRenderingBoundaryAction(int meshid,QObject* parent);
|
||||
MLRenderingEdgeBoundaryAction(QObject* parent);
|
||||
MLRenderingEdgeBoundaryAction(int meshid,QObject* parent);
|
||||
|
||||
void updateRenderingData(MLRenderingData& rd);
|
||||
bool isRenderingDataEnabled(const MLRenderingData& rd) const;
|
||||
};
|
||||
|
||||
class MLRenderingFaceBoundaryAction : public MLRenderingAction
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MLRenderingFaceBoundaryAction(QObject* parent);
|
||||
MLRenderingFaceBoundaryAction(int meshid,QObject* parent);
|
||||
|
||||
void updateRenderingData(MLRenderingData& rd);
|
||||
bool isRenderingDataEnabled(const MLRenderingData& rd) const;
|
||||
|
||||
@ -5,52 +5,65 @@
|
||||
# Compiling this minimal subset does not require any additional library (except obviously qt and vcg).
|
||||
#
|
||||
|
||||
#config += debug_and_release
|
||||
TEMPLATE = subdirs
|
||||
CONFIG += ordered
|
||||
|
||||
|
||||
# the common framework, used by all the plugins,
|
||||
CONFIG += ordered
|
||||
SUBDIRS = common \
|
||||
meshlab \ # the GUI framework
|
||||
meshlabplugins/io_base\ # a few basic file formats (ply, obj, off), without this you cannot open anything
|
||||
meshlabplugins/filter_colorize \
|
||||
meshlabplugins/filter_create \
|
||||
meshlabplugins/filter_sampling \
|
||||
meshlabplugins/edit_quality \
|
||||
meshlabplugins/filter_meshing \
|
||||
meshlabplugins/filter_voronoi \
|
||||
meshlabplugins/filter_mutualinfoxml \
|
||||
meshlabplugins/filter_sdfgpu \
|
||||
meshlabplugins/filter_ao \
|
||||
meshlabplugins/filter_img_patch_param \
|
||||
meshlabplugins/filter_color_projection \
|
||||
sampleplugins/sample_filtergpu \
|
||||
# meshlabplugins/edit_align \
|
||||
# meshlabplugins/filter_mutualinfoxml \
|
||||
# meshlabplugins/filter_meshing \
|
||||
# meshlabplugins/decorate_base \
|
||||
# meshlabplugins/edit_select \
|
||||
# meshlabplugins/edit_align \
|
||||
# plugins_experimental/filter_sketchfab
|
||||
# meshlabplugins/filter_mutualinfoxml
|
||||
#
|
||||
#
|
||||
# Next some other useful, but still easy to be compiled, plugins
|
||||
# Uncomment them if you succeed in compiling the above ones.
|
||||
# meshlabplugins/decorate_background \
|
||||
# meshlabplugins/decorate_base \
|
||||
# meshlabplugins/edit_align \
|
||||
# meshlabplugins/edit_manipulators \
|
||||
# meshlabplugins/edit_select \
|
||||
# meshlabplugins/filter_clean\
|
||||
# meshlabplugins/filter_colorize\
|
||||
# meshlabplugins/filter_create\
|
||||
# meshlabplugins/filter_layer\
|
||||
# meshlabplugins/filter_measure\
|
||||
# meshlabplugins/filter_sampling\
|
||||
# meshlabplugins/filter_select \
|
||||
# meshlabplugins/filter_quality \
|
||||
# meshlabplugins/filter_unsharp \
|
||||
# meshlabplugins/io_collada \
|
||||
# meshlabplugins/io_x3d \
|
||||
# meshlabserver
|
||||
meshlab \
|
||||
# IO plugins
|
||||
meshlabplugins/io_base\
|
||||
meshlabplugins/io_3ds\
|
||||
meshlabplugins/io_collada \
|
||||
meshlabplugins/io_ctm \
|
||||
meshlabplugins/io_json \
|
||||
meshlabplugins/io_u3d\
|
||||
meshlabplugins/io_tri\
|
||||
meshlabplugins/io_x3d \
|
||||
meshlabplugins/io_gts \
|
||||
meshlabplugins/io_expe \
|
||||
meshlabplugins/io_pdb \
|
||||
plugins_experimental/io_TXT \
|
||||
# Filter plugins
|
||||
meshlabplugins/filter_aging \
|
||||
meshlabplugins/filter_ao \
|
||||
meshlabplugins/filter_autoalign \
|
||||
meshlabplugins/filter_camera \
|
||||
meshlabplugins/filter_bnpts \
|
||||
meshlabplugins/filter_clean \
|
||||
meshlabplugins/filter_colorize \
|
||||
meshlabplugins/filter_colorproc \
|
||||
meshlabplugins/filter_color_projection \
|
||||
meshlabplugins/filter_create \
|
||||
meshlabplugins/filter_csg \
|
||||
meshlabplugins/filter_dirt \
|
||||
meshlabplugins/filter_fractal \
|
||||
meshlabplugins/filter_func \
|
||||
meshlabplugins/filter_img_patch_param \
|
||||
meshlabplugins/filter_isoparametrization \
|
||||
meshlabplugins/filter_layer \
|
||||
meshlabplugins/filter_measure \
|
||||
meshlabplugins/filter_meshing \
|
||||
meshlabplugins/filter_mutualinfoxml \
|
||||
meshlabplugins/filter_mls \
|
||||
meshlabplugins/filter_photosynth \
|
||||
meshlabplugins/filter_plymc \
|
||||
meshlabplugins/filter_poisson \
|
||||
meshlabplugins/filter_qhull \
|
||||
meshlabplugins/filter_quality \
|
||||
meshlabplugins/filter_sampling \
|
||||
meshlabplugins/filter_sdfgpu \
|
||||
meshlabplugins/filter_select \
|
||||
meshlabplugins/filter_ssynth \
|
||||
meshlabplugins/filter_texture \
|
||||
meshlabplugins/filter_trioptimize \
|
||||
meshlabplugins/filter_unsharp \
|
||||
meshlabplugins/filter_zippering \
|
||||
|
||||
# Edit Plugins
|
||||
meshlabplugins/edit_quality \
|
||||
# Sample Plugins
|
||||
sampleplugins/samplefilter \
|
||||
sampleplugins/samplefilterdyn \
|
||||
sampleplugins/io_m\
|
||||
sampleplugins/filter_geodesic \
|
||||
sampleplugins/filter_createiso
|
||||
Loading…
x
Reference in New Issue
Block a user