mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-20 03:16:10 +00:00
Corrected include mess with filterscript.h and (important change)
Changed the semantic of the MeshModel::UpdateDataMask - now it always enable a reqested attribute even if it should be already enabled. Re-enabling a ocf attribute is harmless and this can avoid the problem in which for some strange reasons the MeshModel bitmask is no more aligned with the real state of the mesh.
This commit is contained in:
parent
b50cadc2a1
commit
d9d39ebd37
@ -29,7 +29,6 @@
|
||||
#include <wrap/gl/math.h>
|
||||
#include "scriptinterface.h"
|
||||
#include <vcg/complex/append.h>
|
||||
#include "../common/filterscript.h"
|
||||
|
||||
using namespace vcg;
|
||||
|
||||
@ -668,39 +667,26 @@ bool MeshModel::hasDataMask(const int maskToBeTested) const
|
||||
|
||||
void MeshModel::updateDataMask(int neededDataMask)
|
||||
{
|
||||
if((neededDataMask & MM_FACEFACETOPO)!=0)
|
||||
{
|
||||
if (!hasDataMask(MM_FACEFACETOPO))
|
||||
cm.face.EnableFFAdjacency();
|
||||
tri::UpdateTopology<CMeshO>::FaceFace(cm);
|
||||
}
|
||||
if((neededDataMask & MM_VERTFACETOPO)!=0)
|
||||
{
|
||||
if (!hasDataMask(MM_VERTFACETOPO))
|
||||
{
|
||||
cm.vert.EnableVFAdjacency();
|
||||
cm.face.EnableVFAdjacency();
|
||||
}
|
||||
tri::UpdateTopology<CMeshO>::VertexFace(cm);
|
||||
}
|
||||
if( ( (neededDataMask & MM_WEDGTEXCOORD)!=0) && !hasDataMask(MM_WEDGTEXCOORD)) cm.face.EnableWedgeTexCoord();
|
||||
if( ( (neededDataMask & MM_FACECOLOR)!=0) && !hasDataMask(MM_FACECOLOR)) cm.face.EnableColor();
|
||||
if( ( (neededDataMask & MM_FACEQUALITY)!=0) && !hasDataMask(MM_FACEQUALITY)) cm.face.EnableQuality();
|
||||
if( ( (neededDataMask & MM_FACEMARK)!=0) && !hasDataMask(MM_FACEMARK)) cm.face.EnableMark();
|
||||
if( ( (neededDataMask & MM_VERTMARK)!=0) && !hasDataMask(MM_VERTMARK)) cm.vert.EnableMark();
|
||||
if( ( (neededDataMask & MM_VERTCURV)!=0) && !hasDataMask(MM_VERTCURV)) cm.vert.EnableCurvature();
|
||||
if( ( (neededDataMask & MM_VERTCURVDIR)!=0) && !hasDataMask(MM_VERTCURVDIR)) cm.vert.EnableCurvatureDir();
|
||||
if( ( (neededDataMask & MM_VERTRADIUS)!=0) && !hasDataMask(MM_VERTRADIUS)) cm.vert.EnableRadius();
|
||||
if( ( (neededDataMask & MM_VERTTEXCOORD)!=0) && !hasDataMask(MM_VERTTEXCOORD)) cm.vert.EnableTexCoord();
|
||||
|
||||
// if( ( (neededDataMask & MM_FACEFLAGBORDER) && !hasDataMask(MM_FACEFLAGBORDER) ) ||
|
||||
// ( (neededDataMask & MM_VERTFLAGBORDER) && !hasDataMask(MM_VERTFLAGBORDER) ) )
|
||||
// {
|
||||
// if( (currentDataMask & MM_FACEFACETOPO) || (neededDataMask & MM_FACEFACETOPO))
|
||||
// tri::UpdateFlags<CMeshO>::FaceBorderFromFF(cm);
|
||||
// else tri::UpdateFlags<CMeshO>::FaceBorderFromNone(cm);
|
||||
// tri::UpdateFlags<CMeshO>::VertexBorderFromFace(cm);
|
||||
// }
|
||||
if((neededDataMask & MM_FACEFACETOPO)!=0)
|
||||
{
|
||||
cm.face.EnableFFAdjacency();
|
||||
tri::UpdateTopology<CMeshO>::FaceFace(cm);
|
||||
}
|
||||
if((neededDataMask & MM_VERTFACETOPO)!=0)
|
||||
{
|
||||
cm.vert.EnableVFAdjacency();
|
||||
cm.face.EnableVFAdjacency();
|
||||
tri::UpdateTopology<CMeshO>::VertexFace(cm);
|
||||
}
|
||||
if((neededDataMask & MM_WEDGTEXCOORD)!=0) cm.face.EnableWedgeTexCoord();
|
||||
if((neededDataMask & MM_FACECOLOR)!=0) cm.face.EnableColor();
|
||||
if((neededDataMask & MM_FACEQUALITY)!=0) cm.face.EnableQuality();
|
||||
if((neededDataMask & MM_FACEMARK)!=0) cm.face.EnableMark();
|
||||
if((neededDataMask & MM_VERTMARK)!=0) cm.vert.EnableMark();
|
||||
if((neededDataMask & MM_VERTCURV)!=0) cm.vert.EnableCurvature();
|
||||
if((neededDataMask & MM_VERTCURVDIR)!=0) cm.vert.EnableCurvatureDir();
|
||||
if((neededDataMask & MM_VERTRADIUS)!=0) cm.vert.EnableRadius();
|
||||
if((neededDataMask & MM_VERTTEXCOORD)!=0) cm.vert.EnableTexCoord();
|
||||
|
||||
currentDataMask |= neededDataMask;
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
#include <QImage>
|
||||
#include <QAction>
|
||||
#include "GLLogStream.h"
|
||||
|
||||
#include "filterscript.h"
|
||||
|
||||
// Forward declarations needed for creating the used types
|
||||
class CVertexO;
|
||||
@ -545,7 +545,7 @@ private:
|
||||
// QMap<int,RasterModel*> _rendermap;
|
||||
// QReadWriteLock _mutdoc;
|
||||
//};
|
||||
class FilterScript;
|
||||
//class FilterScript;
|
||||
|
||||
class MeshDocument : public QObject
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user