diff --git a/src/common/ml_document/cmesh.h b/src/common/ml_document/cmesh.h index a8c0c187f..d262298bb 100644 --- a/src/common/ml_document/cmesh.h +++ b/src/common/ml_document/cmesh.h @@ -30,28 +30,28 @@ namespace vcg { namespace vertex { -template class Coord3m: public Coord, T> { +template class Coord3m: public Coord, T> { public: static void Name(std::vector & name){name.push_back(std::string("Coord3m"));T::Name(name);} }; -template class Normal3m: public Normal, T> { +template class Normal3m: public Normal, T> { public: static void Name(std::vector & name){name.push_back(std::string("Normal3m"));T::Name(name);} }; -template class Qualitym: public Quality { +template class Qualitym: public Quality { public: static void Name(std::vector & name){name.push_back(std::string("Qualitym"));T::Name(name);} }; -template class CurvaturemOcf: public CurvatureOcf { +template class CurvaturemOcf: public CurvatureOcf { public: static void Name(std::vector & name){name.push_back(std::string("CurvaturemOcf"));T::Name(name);} }; -template class CurvatureDirmOcf: public CurvatureDirOcf, T> { +template class CurvatureDirmOcf: public CurvatureDirOcf, T> { public: static void Name(std::vector & name){name.push_back(std::string("CurvatureDirmOcf"));T::Name(name);} }; -template class RadiusmOcf: public RadiusOcf { +template class RadiusmOcf: public RadiusOcf { public: static void Name(std::vector & name){name.push_back(std::string("RadiusmOcf"));T::Name(name);} }; @@ -59,15 +59,15 @@ public: static void Name(std::vector & name){name.push_back(std::st namespace face { -template class Normal3m: public NormalAbs, T> { +template class Normal3m: public NormalAbs, T> { public: static void Name(std::vector & name){name.push_back(std::string("Normal3m"));T::Name(name);} }; -template class QualitymOcf: public QualityOcf { +template class QualitymOcf: public QualityOcf { public: static void Name(std::vector & name){name.push_back(std::string("QualitymOcf"));T::Name(name);} }; -template class CurvatureDirmOcf: public CurvatureDirOcf, T> { +template class CurvatureDirmOcf: public CurvatureDirOcf, T> { public: static void Name(std::vector & name){name.push_back(std::string("CurvatureDirdOcf"));T::Name(name);} }; diff --git a/src/common/ml_shared_data_context.h b/src/common/ml_shared_data_context.h index a542e924c..3029a2511 100644 --- a/src/common/ml_shared_data_context.h +++ b/src/common/ml_shared_data_context.h @@ -200,17 +200,17 @@ struct MLPerViewGLOptions : public vcg::RenderingModalityGLOptions _perpoint_pointattenuation_enabled = bset[31]; } - static MESHLAB_SCALAR minPointSize() + static Scalarm minPointSize() { return 1.0; } - static MESHLAB_SCALAR maxPointSize() + static Scalarm maxPointSize() { return 15.0; } - static MESHLAB_SCALAR maxLineWidth() + static Scalarm maxLineWidth() { return 5.0; } diff --git a/src/common/mlapplication.h b/src/common/mlapplication.h index 124c62c09..ade1a44be 100644 --- a/src/common/mlapplication.h +++ b/src/common/mlapplication.h @@ -18,7 +18,7 @@ public: #endif static const QString appName(){return tr("MeshLab"); } static const QString architecturalSuffix(const HW_ARCHITECTURE hw) {return "_" + QString::number(int(hw)) + "bit";} - static const QString appArchitecturalName(const HW_ARCHITECTURE hw) {return appName() + architecturalSuffix(hw) + "_" + MeshLabScalarTest::floatingPointPrecision();} + static const QString appArchitecturalName(const HW_ARCHITECTURE hw) {return appName() + architecturalSuffix(hw) + "_" + MeshLabScalarTest::floatingPointPrecision();} static const QString appVer(); static const QString compilerVersion(); static const QString qtVersion(); diff --git a/src/common/parameters/rich_parameter.cpp b/src/common/parameters/rich_parameter.cpp index 40243088d..2dc3f67fd 100644 --- a/src/common/parameters/rich_parameter.cpp +++ b/src/common/parameters/rich_parameter.cpp @@ -156,7 +156,7 @@ bool RichInt::operator==( const RichParameter& rb ) RichFloat::RichFloat( const QString& nm, - const MESHLAB_SCALAR defval, + const Scalarm defval, const QString& desc, const QString& tltip) : RichParameter(nm, FloatValue(defval),desc, tltip) @@ -333,9 +333,9 @@ bool RichColor::operator==( const RichParameter& rb ) RichAbsPerc::RichAbsPerc( const QString& nm, - const MESHLAB_SCALAR defval, - const MESHLAB_SCALAR minval, - const MESHLAB_SCALAR maxval, + const Scalarm defval, + const Scalarm minval, + const Scalarm maxval, const QString& desc, const QString& tltip) : RichParameter(nm, AbsPercValue(defval), desc, tltip), min(minval), max(maxval) @@ -413,9 +413,9 @@ bool RichEnum::operator==( const RichParameter& rb ) RichDynamicFloat::RichDynamicFloat( const QString& nm, - const MESHLAB_SCALAR defval, - const MESHLAB_SCALAR minval, - const MESHLAB_SCALAR maxval, + const Scalarm defval, + const Scalarm minval, + const Scalarm maxval, const QString& desc, const QString& tltip ) : RichParameter(nm, DynamicFloatValue(defval),desc, tltip), min(minval), max(maxval) @@ -669,7 +669,7 @@ bool RichParameterAdapter::create( const QDomElement& np,RichParameter** par ) Matrix44m mm; for(int i=0;i<16;++i) { - MESHLAB_SCALAR val = np.attribute(QString("val")+QString::number(i)).toFloat(&corrconv); + Scalarm val = np.attribute(QString("val")+QString::number(i)).toFloat(&corrconv); if (!corrconv) return false; mm.V()[i]=val; diff --git a/src/common/parameters/rich_parameter.h b/src/common/parameters/rich_parameter.h index 7b46ba0d7..f7fa2e314 100644 --- a/src/common/parameters/rich_parameter.h +++ b/src/common/parameters/rich_parameter.h @@ -103,7 +103,7 @@ public: class RichFloat : public RichParameter { public: - RichFloat(const QString& nm, const MESHLAB_SCALAR defval, const QString& desc = QString(), const QString& tltip = QString()); + RichFloat(const QString& nm, const Scalarm defval, const QString& desc = QString(), const QString& tltip = QString()); ~RichFloat(); QString stringType() const; @@ -175,7 +175,7 @@ public: class RichAbsPerc : public RichParameter { public: - RichAbsPerc(const QString& nm, const MESHLAB_SCALAR defval, const MESHLAB_SCALAR minval, const MESHLAB_SCALAR maxval, const QString& desc = QString(), const QString& tltip = QString()); + RichAbsPerc(const QString& nm, const Scalarm defval, const Scalarm minval, const Scalarm maxval, const QString& desc = QString(), const QString& tltip = QString()); ~RichAbsPerc(); QString stringType() const; @@ -183,8 +183,8 @@ public: RichAbsPerc* clone() const; bool operator==(const RichParameter& rb); - MESHLAB_SCALAR min; - MESHLAB_SCALAR max; + Scalarm min; + Scalarm max; }; class RichEnum : public RichParameter @@ -204,7 +204,7 @@ public: class RichDynamicFloat : public RichParameter { public: - RichDynamicFloat(const QString& nm, const MESHLAB_SCALAR defval, const MESHLAB_SCALAR minval, const MESHLAB_SCALAR maxval, const QString& desc = QString(), const QString& tltip = QString()); + RichDynamicFloat(const QString& nm, const Scalarm defval, const Scalarm minval, const Scalarm maxval, const QString& desc = QString(), const QString& tltip = QString()); ~RichDynamicFloat(); QString stringType() const; @@ -212,8 +212,8 @@ public: RichDynamicFloat* clone() const; bool operator==(const RichParameter& rb); - MESHLAB_SCALAR min; - MESHLAB_SCALAR max; + Scalarm min; + Scalarm max; }; class RichOpenFile : public RichParameter diff --git a/src/common/parameters/rich_parameter_list.cpp b/src/common/parameters/rich_parameter_list.cpp index 0a110dedf..cfb639070 100644 --- a/src/common/parameters/rich_parameter_list.cpp +++ b/src/common/parameters/rich_parameter_list.cpp @@ -90,7 +90,7 @@ int RichParameterList::getInt(const QString& name) const * @return the float of the RichParameter having the given name. * @throws an MLException if the name is not found in the list */ -MESHLAB_SCALAR RichParameterList::getFloat(const QString& name) const +Scalarm RichParameterList::getFloat(const QString& name) const { return getParameterByName(name).value().getFloat(); } @@ -144,16 +144,16 @@ Point3m RichParameterList::getPoint3m(const QString& name) const * @return the shot of the RichParameter having the given name. * @throws an MLException if the name is not found in the list */ -Shot RichParameterList::getShotf(const QString& name) const +Shot RichParameterList::getShotf(const QString& name) const { - return Shot::Construct(getParameterByName(name).value().getShotf()); + return Shot::Construct(getParameterByName(name).value().getShotf()); } /** * @return the float of the RichParameter having the given name. * @throws an MLException if the name is not found in the list */ -MESHLAB_SCALAR RichParameterList::getAbsPerc(const QString& name) const +Scalarm RichParameterList::getAbsPerc(const QString& name) const { return getParameterByName(name).value().getAbsPerc(); } @@ -180,7 +180,7 @@ MeshModel * RichParameterList::getMesh(const QString& name) const * @return the float of the RichParameter having the given name. * @throws an MLException if the name is not found in the list */ -MESHLAB_SCALAR RichParameterList::getDynamicFloat(const QString& name) const +Scalarm RichParameterList::getDynamicFloat(const QString& name) const { return getParameterByName(name).value().getDynamicFloat(); } diff --git a/src/common/parameters/rich_parameter_list.h b/src/common/parameters/rich_parameter_list.h index 22b44e20a..5c5c29929 100644 --- a/src/common/parameters/rich_parameter_list.h +++ b/src/common/parameters/rich_parameter_list.h @@ -99,17 +99,17 @@ public: bool getBool(const QString& name) const; int getInt(const QString& name) const; - MESHLAB_SCALAR getFloat(const QString& name) const; + Scalarm getFloat(const QString& name) const; QString getString(const QString& name) const; Matrix44m getMatrix44(const QString& name) const; Point3m getPoint3m(const QString& name) const; Shotm getShotf(const QString& name) const; QColor getColor(const QString& name) const; vcg::Color4b getColor4b(const QString& name) const; - MESHLAB_SCALAR getAbsPerc(const QString& name) const; + Scalarm getAbsPerc(const QString& name) const; int getEnum(const QString& name) const; MeshModel* getMesh(const QString& name) const; - MESHLAB_SCALAR getDynamicFloat(const QString& name) const; + Scalarm getDynamicFloat(const QString& name) const; QString getOpenFileName(const QString& name) const; QString getSaveFileName(const QString& name) const; diff --git a/src/common/parameters/value.h b/src/common/parameters/value.h index 8130d9e4e..09c0fd551 100644 --- a/src/common/parameters/value.h +++ b/src/common/parameters/value.h @@ -45,16 +45,16 @@ public: virtual bool getBool() const { assert(0); return bool(); } virtual int getInt() const { assert(0); return int(); } - virtual MESHLAB_SCALAR getFloat() const { assert(0); return MESHLAB_SCALAR(); } + virtual Scalarm getFloat() const { assert(0); return Scalarm(); } virtual QString getString() const { assert(0); return QString(); } virtual Matrix44m getMatrix44f() const { assert(0); return Matrix44m(); } virtual Point3m getPoint3f() const { assert(0); return Point3m(); } virtual Shotm getShotf() const { assert(0); return Shotm(); } virtual QColor getColor() const { assert(0); return QColor(); } - virtual MESHLAB_SCALAR getAbsPerc() const { assert(0); return MESHLAB_SCALAR(); } + virtual Scalarm getAbsPerc() const { assert(0); return Scalarm(); } virtual int getEnum() const { assert(0); return int(); } virtual MeshModel* getMesh() const { assert(0); return NULL; } - virtual MESHLAB_SCALAR getDynamicFloat() const { assert(0); return MESHLAB_SCALAR(); } + virtual Scalarm getDynamicFloat() const { assert(0); return Scalarm(); } virtual QString getFileName() const { assert(0); return QString(); } virtual bool isBool() const { return false; } @@ -117,7 +117,7 @@ public: FloatValue(const float val) :pval(val) {} ~FloatValue() {} - inline MESHLAB_SCALAR getFloat() const { return pval; } + inline Scalarm getFloat() const { return pval; } inline bool isFloat() const { return true; } inline QString typeName() const { return QString("Float"); } inline void set(const Value& p) { pval = p.getFloat(); } @@ -125,7 +125,7 @@ public: void fillToXMLElement(QDomElement& element) const; private: - MESHLAB_SCALAR pval; + Scalarm pval; }; class StringValue : public Value @@ -220,7 +220,7 @@ public: AbsPercValue(const float val) :FloatValue(val) {} ~AbsPercValue() {} - inline MESHLAB_SCALAR getAbsPerc() const { return getFloat(); } + inline Scalarm getAbsPerc() const { return getFloat(); } inline QString typeName() const { return QString("AbsPerc"); } inline bool isAbsPerc() const { return true; } inline AbsPercValue* clone() const {return new AbsPercValue(*this);} @@ -247,7 +247,7 @@ public: DynamicFloatValue(const float val) :FloatValue(val) {} ~DynamicFloatValue() {} - inline MESHLAB_SCALAR getDynamicFloat() const { return getFloat(); } + inline Scalarm getDynamicFloat() const { return getFloat(); } inline bool isDynamicFloat() const { return true; } inline QString typeName() const { return QString("DynamicFloat"); } inline DynamicFloatValue* clone() const {return new DynamicFloatValue(*this);} diff --git a/src/meshlab/glarea_setting.h b/src/meshlab/glarea_setting.h index e8facbdac..0372db6bb 100644 --- a/src/meshlab/glarea_setting.h +++ b/src/meshlab/glarea_setting.h @@ -64,7 +64,7 @@ public: inline static QString pointDistanceAttenuationParam() {return "MeshLab::Appearance::pointDistanceAttenuation";} bool pointSmooth; inline static QString pointSmoothParam() {return "MeshLab::Appearance::pointSmooth";} - MESHLAB_SCALAR pointSize; + Scalarm pointSize; inline static QString pointSizeParam() {return "MeshLab::Appearance::pointSize";} bool wheelDirection; inline static QString wheelDirectionParam() {return "MeshLab::Appearance::wheelDirection";} diff --git a/src/meshlab/rich_parameter_gui/richparameterwidgets.cpp b/src/meshlab/rich_parameter_gui/richparameterwidgets.cpp index 9d8ad1f7c..24d621162 100644 --- a/src/meshlab/rich_parameter_gui/richparameterwidgets.cpp +++ b/src/meshlab/rich_parameter_gui/richparameterwidgets.cpp @@ -675,7 +675,7 @@ void Matrix44fWidget::setValue(QString name, Matrix44m newVal) Matrix44m Matrix44fWidget::getValue() { if (!valid) { - MESHLAB_SCALAR val[16]; + Scalarm val[16]; for (unsigned int i = 0; i < 16; ++i) val[i] = coordSB[i]->text().toFloat(); return Matrix44m(val); diff --git a/src/meshlabplugins/decorate_background/decorate_background.cpp b/src/meshlabplugins/decorate_background/decorate_background.cpp index c47114bb2..d4551e06d 100644 --- a/src/meshlabplugins/decorate_background/decorate_background.cpp +++ b/src/meshlabplugins/decorate_background/decorate_background.cpp @@ -149,16 +149,16 @@ void DecorateBackgroundPlugin::decorateDoc(const QAction* a, MeshDocument &m, co { emit this->askViewerShot("backGrid"); - MESHLAB_SCALAR scaleBB = parset->getFloat(BoxRatioParam()); - MESHLAB_SCALAR majorTick = fabs(parset->getFloat(GridMajorParam())); - MESHLAB_SCALAR minorTick = fabs(parset->getFloat(GridMinorParam())); + Scalarm scaleBB = parset->getFloat(BoxRatioParam()); + Scalarm majorTick = fabs(parset->getFloat(GridMajorParam())); + Scalarm minorTick = fabs(parset->getFloat(GridMinorParam())); bool backFlag = parset->getBool(GridBackParam()); bool shadowFlag = parset->getBool(ShowShadowParam()); Color4b backColor = parset->getColor4b(GridColorBackParam()); Color4b frontColor = parset->getColor4b(GridColorFrontParam()); - MESHLAB_SCALAR baseLineWidth = parset->getFloat(GridBaseLineWidthParam()); + Scalarm baseLineWidth = parset->getFloat(GridBaseLineWidthParam()); Box3m bb = m.bbox(); - MESHLAB_SCALAR scalefactor = std::max(0.1, (scaleBB - 1.0)); + Scalarm scalefactor = std::max(0.1, (scaleBB - 1.0)); bb.Offset((bb.max - bb.min)*(scalefactor/2.0)); // minortick should never be more than majortick diff --git a/src/meshlabplugins/decorate_base/decorate_base.cpp b/src/meshlabplugins/decorate_base/decorate_base.cpp index 72698f73a..96ce8071e 100644 --- a/src/meshlabplugins/decorate_base/decorate_base.cpp +++ b/src/meshlabplugins/decorate_base/decorate_base.cpp @@ -184,13 +184,13 @@ void DecorateBasePlugin::decorateMesh(const QAction* a, MeshModel &m, const Rich case DP_SHOW_NORMALS: { glPushAttrib(GL_ENABLE_BIT ); - MESHLAB_SCALAR NormalLen=rm->getFloat(NormalLength()); - MESHLAB_SCALAR NormalWid = rm->getFloat(NormalWidth()); + Scalarm NormalLen=rm->getFloat(NormalLength()); + Scalarm NormalWid = rm->getFloat(NormalWidth()); vcg::Color4b VertNormalColor = rm->getColor4b(NormalVertColor()); vcg::Color4b FaceNormalColor = rm->getColor4b(NormalFaceColor()); bool showselection = rm->getBool(NormalSelection()); - MESHLAB_SCALAR LineLen = m.cm.bbox.Diag()*NormalLen; + Scalarm LineLen = m.cm.bbox.Diag()*NormalLen; //query line width range GLfloat widthRange[2]; diff --git a/src/meshlabplugins/edit_mutualcorrs/alignset.cpp b/src/meshlabplugins/edit_mutualcorrs/alignset.cpp index 9b415ee1d..ae6a89e78 100644 --- a/src/meshlabplugins/edit_mutualcorrs/alignset.cpp +++ b/src/meshlabplugins/edit_mutualcorrs/alignset.cpp @@ -162,18 +162,18 @@ void AlignSet::resize(int max_side) { #endif } -void AlignSet::renderScene(vcg::Shot &view, int component) { +void AlignSet::renderScene(vcg::Shot &view, int component) { QSize fbosize(wt,ht); QGLFramebufferObjectFormat frmt; frmt.setInternalTextureFormat(GL_RGBA); frmt.setAttachment(QGLFramebufferObject::Depth); QGLFramebufferObject fbo(fbosize,frmt); - MESHLAB_SCALAR _near, _far; + Scalarm _near, _far; _near = 0.1f; _far = 10000.0f; Box3m bb=Box3m::Construct(mesh->bbox); - GlShot< vcg::Shot >::GetNearFarPlanes(view, bb, _near, _far); + GlShot< vcg::Shot >::GetNearFarPlanes(view, bb, _near, _far); //assert(_near <= _far); if(_near <= 0) _near = 0.1f; if(_far < _near) _far = 1000.0f; @@ -186,7 +186,7 @@ void AlignSet::renderScene(vcg::Shot &view, int component) { glViewport(0, 0, wt, ht); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - GlShot< vcg::Shot >::SetView(shot, 0.5*_near, 2*_far); + GlShot< vcg::Shot >::SetView(shot, 0.5*_near, 2*_far); // err = glGetError(); diff --git a/src/meshlabplugins/edit_mutualcorrs/alignset.h b/src/meshlabplugins/edit_mutualcorrs/alignset.h index b5d7a7796..48345d303 100644 --- a/src/meshlabplugins/edit_mutualcorrs/alignset.h +++ b/src/meshlabplugins/edit_mutualcorrs/alignset.h @@ -36,7 +36,7 @@ class AlignSet { CMeshO* mesh; QImage* image; double imageRatio; - vcg::Shot shot; + vcg::Shot shot; vcg::Box3 box; std::vector correspList; //List that includes corresponces involving the model double error; //alignment error in px @@ -62,7 +62,7 @@ class AlignSet { bool setFocal(double f); //return false if unchanged void setPixelSizeMm(double ccdWidth); - void renderScene(vcg::Shot& shot, int component); + void renderScene(vcg::Shot& shot, int component); void readRender(int component); void drawMeshPoints(); diff --git a/src/meshlabplugins/filter_ao/filter_ao.cpp b/src/meshlabplugins/filter_ao/filter_ao.cpp index 2b31934d3..630bdab07 100644 --- a/src/meshlabplugins/filter_ao/filter_ao.cpp +++ b/src/meshlabplugins/filter_ao/filter_ao.cpp @@ -149,9 +149,9 @@ bool AmbientOcclusionPlugin::applyFilter(const QAction * /*filter*/, MeshDocumen depthTexArea = depthTexSize*depthTexSize; numViews = par.getInt("reqViews"); errInit = false; - MESHLAB_SCALAR dirBias = par.getFloat("dirBias"); + Scalarm dirBias = par.getFloat("dirBias"); Point3m coneDir = par.getPoint3m("coneDir"); - MESHLAB_SCALAR coneAngle = par.getFloat("coneAngle"); + Scalarm coneAngle = par.getFloat("coneAngle"); if(perFace) m.updateDataMask(MeshModel::MM_FACEQUALITY | MeshModel::MM_FACECOLOR); @@ -159,10 +159,10 @@ bool AmbientOcclusionPlugin::applyFilter(const QAction * /*filter*/, MeshDocumen m.updateDataMask(MeshModel::MM_VERTQUALITY | MeshModel::MM_VERTCOLOR); std::vector unifDirVec; - GenNormal::Fibonacci(numViews,unifDirVec); + GenNormal::Fibonacci(numViews,unifDirVec); std::vector coneDirVec; - GenNormal::UniformCone(numViews, coneDirVec, math::ToRad(coneAngle), coneDir); + GenNormal::UniformCone(numViews, coneDirVec, math::ToRad(coneAngle), coneDir); std::random_shuffle(unifDirVec.begin(),unifDirVec.end()); std::random_shuffle(coneDirVec.begin(),coneDirVec.end()); diff --git a/src/meshlabplugins/filter_camera/filter_camera.cpp b/src/meshlabplugins/filter_camera/filter_camera.cpp index d04d419a4..25771e2cf 100644 --- a/src/meshlabplugins/filter_camera/filter_camera.cpp +++ b/src/meshlabplugins/filter_camera/filter_camera.cpp @@ -316,7 +316,7 @@ bool FilterCameraPlugin::applyFilter(const QAction *filter, MeshDocument &md, st Point3m tranVec(0,0,0); Matrix44m trTran,trTranInv; - MESHLAB_SCALAR Scale= par.getFloat("scale"); + Scalarm Scale= par.getFloat("scale"); trScale.SetScale(Scale,Scale,Scale); switch(par.getEnum("scaleCenter")) diff --git a/src/meshlabplugins/filter_clean/cleanfilter.cpp b/src/meshlabplugins/filter_clean/cleanfilter.cpp index 9456cb72f..6b517a83e 100644 --- a/src/meshlabplugins/filter_clean/cleanfilter.cpp +++ b/src/meshlabplugins/filter_clean/cleanfilter.cpp @@ -32,7 +32,7 @@ using namespace std; using namespace vcg; -int SnapVertexBorder(CMeshO &m, MESHLAB_SCALAR threshold,vcg::CallBackPos * cb); +int SnapVertexBorder(CMeshO &m, Scalarm threshold,vcg::CallBackPos * cb); CleanFilter::CleanFilter() { @@ -274,9 +274,9 @@ bool CleanFilter::applyFilter(const QAction *filter, MeshDocument &md, std::map< { case FP_BALL_PIVOTING: { - MESHLAB_SCALAR Radius = par.getAbsPerc("BallRadius"); - MESHLAB_SCALAR Clustering = par.getFloat("Clustering") / 100.0f; - MESHLAB_SCALAR CreaseThr = math::ToRad(par.getFloat("CreaseThr")); + Scalarm Radius = par.getAbsPerc("BallRadius"); + Scalarm Clustering = par.getFloat("Clustering") / 100.0f; + Scalarm CreaseThr = math::ToRad(par.getFloat("CreaseThr")); bool DeleteFaces = par.getBool("DeleteFaces"); if(DeleteFaces) { @@ -294,7 +294,7 @@ bool CleanFilter::applyFilter(const QAction *filter, MeshDocument &md, std::map< case FP_REMOVE_ISOLATED_DIAMETER: { - MESHLAB_SCALAR minCC= par.getAbsPerc("MinComponentDiag"); + Scalarm minCC= par.getAbsPerc("MinComponentDiag"); std::pair delInfo= tri::Clean::RemoveSmallConnectedComponentsDiameter(m.cm,minCC); log("Removed %i connected components out of %i", delInfo.second, delInfo.first); if (par.getBool("removeUnref")) @@ -321,7 +321,7 @@ bool CleanFilter::applyFilter(const QAction *filter, MeshDocument &md, std::map< { int deletedFN=0; int deletedVN=0; - MESHLAB_SCALAR val=par.getAbsPerc("MaxQualityThr"); + Scalarm val=par.getAbsPerc("MaxQualityThr"); CMeshO::VertexIterator vi; for(vi=m.cm.vert.begin();vi!=m.cm.vert.end();++vi) if(!(*vi).IsD() && (*vi).Q()::RemoveTVertexByCollapse(m.cm, threshold, repeat); log("Successfully removed %d t-vertices", total); @@ -358,7 +358,7 @@ bool CleanFilter::applyFilter(const QAction *filter, MeshDocument &md, std::map< errorMessage = "Non manifold mesh. Please clean the mesh first."; return false; } - MESHLAB_SCALAR threshold = par.getFloat("Threshold"); + Scalarm threshold = par.getFloat("Threshold"); bool repeat = par.getBool("Repeat"); int total = tri::Clean::RemoveTVertexByFlip(m.cm, threshold, repeat); log("Successfully removed %d t-vertices", total); @@ -366,7 +366,7 @@ bool CleanFilter::applyFilter(const QAction *filter, MeshDocument &md, std::map< case FP_MERGE_WEDGE_TEX : { - MESHLAB_SCALAR threshold = par.getFloat("MergeThr"); + Scalarm threshold = par.getFloat("MergeThr"); tri::UpdateTopology::VertexFace(m.cm); int total = tri::UpdateTexture::WedgeTexMergeClose(m.cm, threshold); log("Successfully merged %d wedge tex coord distant less than %f", total,threshold); @@ -409,7 +409,7 @@ bool CleanFilter::applyFilter(const QAction *filter, MeshDocument &md, std::map< case FP_REMOVE_NON_MANIF_VERT : { - MESHLAB_SCALAR threshold = par.getFloat("VertDispRatio"); + Scalarm threshold = par.getFloat("VertDispRatio"); int total = tri::Clean::SplitNonManifoldVertex(m.cm,threshold); log("Successfully split %d non manifold vertices faces", total); m.UpdateBoxAndNormals(); @@ -440,7 +440,7 @@ bool CleanFilter::applyFilter(const QAction *filter, MeshDocument &md, std::map< case FP_SNAP_MISMATCHED_BORDER : { - MESHLAB_SCALAR threshold = par.getFloat("EdgeDistRatio"); + Scalarm threshold = par.getFloat("EdgeDistRatio"); int total = SnapVertexBorder(m.cm, threshold,cb); log("Successfully Split %d faces to snap", total); m.clearDataMask(MeshModel::MM_FACEFACETOPO); @@ -463,7 +463,7 @@ bool CleanFilter::applyFilter(const QAction *filter, MeshDocument &md, std::map< } -int SnapVertexBorder(CMeshO &m, MESHLAB_SCALAR threshold, vcg::CallBackPos * cb) +int SnapVertexBorder(CMeshO &m, Scalarm threshold, vcg::CallBackPos * cb) { tri::Allocator::CompactEveryVector(m); diff --git a/src/meshlabplugins/filter_color_projection/filter_color_projection.cpp b/src/meshlabplugins/filter_color_projection/filter_color_projection.cpp index 1d983e09a..89ce0c5b9 100644 --- a/src/meshlabplugins/filter_color_projection/filter_color_projection.cpp +++ b/src/meshlabplugins/filter_color_projection/filter_color_projection.cpp @@ -234,12 +234,12 @@ bool FilterColorProjectionPlugin::applyFilter(const QAction *filter, MeshDocumen { bool use_depth = par.getBool("usedepth"); bool onselection = par.getBool("onselection"); - float eta = par.getFloat("deptheta"); + Scalarm eta = par.getFloat("deptheta"); QColor blank = par.getColor("blankColor"); - float depth=0; // depth of point (distance from camera) - float pdepth=0; // depth value of projected point (from depth map) + Scalarm depth=0; // depth of point (distance from camera) + Scalarm pdepth=0; // depth value of projected point (from depth map) // get current raster and model RasterModel *raster = md.rm(); @@ -327,7 +327,7 @@ bool FilterColorProjectionPlugin::applyFilter(const QAction *filter, MeshDocumen case FP_MULTIIMAGETRIVIALPROJ : { bool onselection = par.getBool("onselection"); - float eta = par.getFloat("deptheta"); + Scalarm eta = par.getFloat("deptheta"); bool useangle = par.getBool("useangle"); bool usedistance = par.getBool("usedistance"); bool useborders = par.getBool("useborders"); @@ -335,8 +335,8 @@ bool FilterColorProjectionPlugin::applyFilter(const QAction *filter, MeshDocumen bool usealphamask = par.getBool("usealpha"); QColor blank = par.getColor("blankColor"); - float depth=0; // depth of point (distance from camera) - float pdepth=0; // depth value of projected point (from depth map) + Scalarm depth=0; // depth of point (distance from camera) + Scalarm pdepth=0; // depth value of projected point (from depth map) double pweight; // pixel weight MeshModel *model; bool do_project; @@ -605,7 +605,7 @@ bool FilterColorProjectionPlugin::applyFilter(const QAction *filter, MeshDocumen //bool onselection = par.getBool("onselection"); int texsize = par.getInt("texsize"); bool dorefill = par.getBool("dorefill"); - float eta = par.getFloat("deptheta"); + Scalarm eta = par.getFloat("deptheta"); bool useangle = par.getBool("useangle"); bool usedistance = par.getBool("usedistance"); bool useborders = par.getBool("useborders"); @@ -616,8 +616,8 @@ bool FilterColorProjectionPlugin::applyFilter(const QAction *filter, MeshDocumen int textW = texsize; int textH = texsize; - float depth=0; // depth of point (distance from camera) - float pdepth=0; // depth value of projected point (from depth map) + Scalarm depth=0; // depth of point (distance from camera) + Scalarm pdepth=0; // depth value of projected point (from depth map) double pweight; // pixel weight MeshModel *model; bool do_project; diff --git a/src/meshlabplugins/filter_colorproc/filter_colorproc.cpp b/src/meshlabplugins/filter_colorproc/filter_colorproc.cpp index af70945a6..4b3149051 100644 --- a/src/meshlabplugins/filter_colorproc/filter_colorproc.cpp +++ b/src/meshlabplugins/filter_colorproc/filter_colorproc.cpp @@ -41,7 +41,7 @@ using namespace std; using namespace vcg; -typedef Histogram Histogramm; +typedef Histogram Histogramm; FilterColorProc::FilterColorProc() { @@ -389,7 +389,7 @@ bool FilterColorProc::applyFilter(const QAction *filter, MeshDocument &md, std:: case CP_THRESHOLDING: { - MESHLAB_SCALAR threshold = math::Clamp(par.getDynamicFloat("threshold"), 0.0, 255.0); + Scalarm threshold = math::Clamp(par.getDynamicFloat("threshold"), 0.0, 255.0); QColor temp = par.getColor("color1"); Color4b c1 = Color4b(temp.red(), temp.green(), temp.blue(), temp.alpha()); temp = par.getColor("color2"); @@ -402,9 +402,9 @@ bool FilterColorProc::applyFilter(const QAction *filter, MeshDocument &md, std:: case CP_CONTR_BRIGHT: { - MESHLAB_SCALAR brightness = par.getDynamicFloat("brightness"); - MESHLAB_SCALAR contrast = par.getDynamicFloat("contrast"); - MESHLAB_SCALAR gamma = math::Clamp(par.getDynamicFloat("gamma"), 0.1, 5.0); + Scalarm brightness = par.getDynamicFloat("brightness"); + Scalarm contrast = par.getDynamicFloat("contrast"); + Scalarm gamma = math::Clamp(par.getDynamicFloat("gamma"), 0.1, 5.0); bool selected = par.getBool("onSelected"); vcg::tri::UpdateColor::PerVertexGamma(m->cm, gamma, selected); @@ -454,10 +454,10 @@ bool FilterColorProc::applyFilter(const QAction *filter, MeshDocument &md, std:: case CP_COLOURISATION: { //reads parameters and normalizes their values in [0,1] - MESHLAB_SCALAR luminance = math::Clamp(par.getDynamicFloat("luminance")/100, 0.0, 1.0); - MESHLAB_SCALAR saturation = math::Clamp(par.getDynamicFloat("saturation")/100, 0.0, 1.0); - MESHLAB_SCALAR hue = math::Clamp(par.getDynamicFloat("hue")/360, 0.0, 1.0); - MESHLAB_SCALAR intensity = math::Clamp(par.getDynamicFloat("intensity")/100, 0.0, 1.0); + Scalarm luminance = math::Clamp(par.getDynamicFloat("luminance")/100, 0.0, 1.0); + Scalarm saturation = math::Clamp(par.getDynamicFloat("saturation")/100, 0.0, 1.0); + Scalarm hue = math::Clamp(par.getDynamicFloat("hue")/360, 0.0, 1.0); + Scalarm intensity = math::Clamp(par.getDynamicFloat("intensity")/100, 0.0, 1.0); bool selected = par.getBool("onSelected"); double r, g, b; //converts color from HSL to RGB.... @@ -560,15 +560,15 @@ bool FilterColorProc::applyFilter(const QAction *filter, MeshDocument &md, std:: { m->updateDataMask(MeshModel::MM_VERTCOLOR); - float RangeMin = par.getFloat("minVal"); - float RangeMax = par.getFloat("maxVal"); + Scalarm RangeMin = par.getFloat("minVal"); + Scalarm RangeMax = par.getFloat("maxVal"); bool usePerc = par.getDynamicFloat("perc")>0; Histogramm H; tri::Stat::ComputePerVertexQualityHistogram(m->cm, H); - float PercLo = H.Percentile(par.getDynamicFloat("perc") / 100.f); - float PercHi = H.Percentile(1.0 - par.getDynamicFloat("perc") / 100.f); + Scalarm PercLo = H.Percentile(par.getDynamicFloat("perc") / 100.0); + Scalarm PercHi = H.Percentile(1.0 - par.getDynamicFloat("perc") / 100.0); if (par.getBool("zeroSym")) { @@ -592,15 +592,15 @@ bool FilterColorProc::applyFilter(const QAction *filter, MeshDocument &md, std:: case CP_CLAMP_QUALITY: { - float RangeMin = par.getFloat("minVal"); - float RangeMax = par.getFloat("maxVal"); + Scalarm RangeMin = par.getFloat("minVal"); + Scalarm RangeMax = par.getFloat("maxVal"); bool usePerc = par.getDynamicFloat("perc")>0; Histogramm H; tri::Stat::ComputePerVertexQualityHistogram(m->cm, H); - float PercLo = H.Percentile(par.getDynamicFloat("perc") / 100.f); - float PercHi = H.Percentile(1.0 - par.getDynamicFloat("perc") / 100.f); + Scalarm PercLo = H.Percentile(par.getDynamicFloat("perc") / 100.0); + Scalarm PercHi = H.Percentile(1.0 - par.getDynamicFloat("perc") / 100.0); if (par.getBool("zeroSym")) { @@ -625,15 +625,15 @@ bool FilterColorProc::applyFilter(const QAction *filter, MeshDocument &md, std:: case CP_MAP_FQUALITY_INTO_COLOR: { m->updateDataMask(MeshModel::MM_FACECOLOR); - float RangeMin = par.getFloat("minVal"); - float RangeMax = par.getFloat("maxVal"); - float perc = par.getDynamicFloat("perc"); + Scalarm RangeMin = par.getFloat("minVal"); + Scalarm RangeMax = par.getFloat("maxVal"); + Scalarm perc = par.getDynamicFloat("perc"); bool usePerc = perc>0; Histogramm H; tri::Stat::ComputePerFaceQualityHistogram(m->cm, H); - float PercLo = H.Percentile(perc / 100.f); - float PercHi = H.Percentile(1.0 - perc / 100.f); + Scalarm PercLo = H.Percentile(perc / 100.0); + Scalarm PercHi = H.Percentile(1.0 - perc / 100.0); // Make the range and percentile symmetric w.r.t. zero, so that // the value zero is always colored in yellow @@ -693,9 +693,9 @@ bool FilterColorProc::applyFilter(const QAction *filter, MeshDocument &md, std:: { m->updateDataMask(MeshModel::MM_FACECOLOR | MeshModel::MM_FACEQUALITY); CMeshO::FaceIterator fi; - Distribution distrib; - MESHLAB_SCALAR minV = 0; - MESHLAB_SCALAR maxV = 1.0; + Distribution distrib; + Scalarm minV = 0; + Scalarm maxV = 1.0; int metric = par.getEnum("Metric"); if (metric == 4 || metric == 5) { diff --git a/src/meshlabplugins/filter_create/filter_create.cpp b/src/meshlabplugins/filter_create/filter_create.cpp index 520f2144b..206ba68fd 100644 --- a/src/meshlabplugins/filter_create/filter_create.cpp +++ b/src/meshlabplugins/filter_create/filter_create.cpp @@ -198,8 +198,8 @@ bool FilterCreate::applyFilter(const QAction *filter, MeshDocument &md, std::map case CR_TORUS: { m = md.addNewMesh("", this->filterName(ID(filter))); - float hRadius=par.getFloat("hRadius"); - float vRadius=par.getFloat("vRadius"); + Scalarm hRadius=par.getFloat("hRadius"); + Scalarm vRadius=par.getFloat("vRadius"); int hSubdiv=par.getInt("hSubdiv"); int vSubdiv=par.getInt("vSubdiv"); tri::Torus(m->cm,hRadius,vRadius,hSubdiv,vSubdiv); @@ -365,20 +365,20 @@ bool FilterCreate::applyFilter(const QAction *filter, MeshDocument &md, std::map // find extent - float dimH = -1000000; - float dimV = -1000000; + Scalarm dimH = -1000000; + Scalarm dimV = -1000000; for (size_t i = 0; i < selected_pts.size(); ++i) { Point3m pp = plane.Projection(selected_pts[i]); - float distH = fabs(((pp - centerP) * dirH)); - float distV = fabs(((pp - centerP) * dirV)); + Scalarm distH = fabs(((pp - centerP) * dirH)); + Scalarm distV = fabs(((pp - centerP) * dirV)); if (distH > dimH) dimH = distH; if (distV > dimV) dimV = distV; } - float exScale = par.getFloat("extent"); + Scalarm exScale = par.getFloat("extent"); dimV = dimV * exScale; dimH = dimH * exScale; log("extent on plane [%f, %f]", dimV, dimH); @@ -482,7 +482,7 @@ bool FilterCreate::applyFilter(const QAction *filter, MeshDocument &md, std::map case CR_SPHERE_CAP: { int rec = par.getInt("subdiv"); - const float angleDeg = par.getFloat("angle"); + const Scalarm angleDeg = par.getFloat("angle"); m = md.addNewMesh("", this->filterName(ID(filter))); m->updateDataMask(MeshModel::MM_FACEFACETOPO); tri::UpdateTopology::FaceFace(m->cm); @@ -492,7 +492,7 @@ bool FilterCreate::applyFilter(const QAction *filter, MeshDocument &md, std::map case CR_SPHERE: { int rec = par.getInt("subdiv"); - float radius = par.getFloat("radius"); + Scalarm radius = par.getFloat("radius"); m = md.addNewMesh("", this->filterName(ID(filter))); m->cm.face.EnableFFAdjacency(); m->updateDataMask(MeshModel::MM_FACEFACETOPO); @@ -503,7 +503,7 @@ bool FilterCreate::applyFilter(const QAction *filter, MeshDocument &md, std::map case CR_BOX: { - float sz=par.getFloat("size"); + Scalarm sz=par.getFloat("size"); Box3m b(Point3m(1,1,1)*(-sz/2),Point3m(1,1,1)*(sz/2)); m = md.addNewMesh("", this->filterName(ID(filter))); tri::Box(m->cm,b); @@ -512,9 +512,9 @@ bool FilterCreate::applyFilter(const QAction *filter, MeshDocument &md, std::map case CR_CONE: { - float r0 = par.getFloat("r0"); - float r1 = par.getFloat("r1"); - float h = par.getFloat("h"); + Scalarm r0 = par.getFloat("r0"); + Scalarm r1 = par.getFloat("r1"); + Scalarm h = par.getFloat("h"); int subdiv = par.getInt("subdiv"); m = md.addNewMesh("", this->filterName(ID(filter))); tri::Cone(m->cm, r0, r1, h, subdiv); diff --git a/src/meshlabplugins/filter_globalregistration/globalregistration.cpp b/src/meshlabplugins/filter_globalregistration/globalregistration.cpp index 8840b2ca4..d6fb65e31 100644 --- a/src/meshlabplugins/filter_globalregistration/globalregistration.cpp +++ b/src/meshlabplugins/filter_globalregistration/globalregistration.cpp @@ -28,7 +28,7 @@ #include //#include -using PointType = gr::Point3D; +using PointType = gr::Point3D; GlobalRegistrationPlugin::GlobalRegistrationPlugin() { @@ -93,7 +93,7 @@ void GlobalRegistrationPlugin::initParameterList(const QAction *action,MeshDocum } -using MatrixType = Eigen::Matrix; +using MatrixType = Eigen::Matrix; struct RealTimeTransformVisitor { CMeshO* mesh = nullptr; diff --git a/src/meshlabplugins/filter_layer/filter_layer.cpp b/src/meshlabplugins/filter_layer/filter_layer.cpp index 2780ed03b..97d8a8237 100644 --- a/src/meshlabplugins/filter_layer/filter_layer.cpp +++ b/src/meshlabplugins/filter_layer/filter_layer.cpp @@ -649,7 +649,7 @@ bool FilterLayerPlugin::applyFilter(const QAction *filter, MeshDocument &md, std for (uint i = 0; i < num_cams; ++i) { float f, k1, k2; - MESHLAB_SCALAR R[16] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1 }; + Scalarm R[16] = { 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,1 }; vcg::Point3f t; fgets(line, 100, fp);; if (line[0] == '\0') return false; sscanf(line, "%f %f %f", &f, &k1, &k2); diff --git a/src/meshlabplugins/filter_measure/filter_measure.cpp b/src/meshlabplugins/filter_measure/filter_measure.cpp index 354148d81..6976ada10 100644 --- a/src/meshlabplugins/filter_measure/filter_measure.cpp +++ b/src/meshlabplugins/filter_measure/filter_measure.cpp @@ -404,7 +404,7 @@ bool FilterMeasurePlugin::computeGeometricMeasures(MeshDocument& md, std::map eDist; + Distribution eDist; tri::Stat::ComputeFaceEdgeLengthDistribution(m, eDist, false); log("Mesh Total Len of %i Edges is %f Avg Len %f", int(eDist.Cnt()), eDist.Sum(), eDist.Avg()); tri::Stat::ComputeFaceEdgeLengthDistribution(m, eDist, true); @@ -523,7 +523,7 @@ bool FilterMeasurePlugin::computeAreaPerimeterOfSelection(MeshDocument& md, std: bool FilterMeasurePlugin::perVertexQualityStat(MeshDocument& md, std::map& outputValues) { CMeshO &m = md.mm()->cm; - Distribution DD; + Distribution DD; tri::Stat::ComputePerVertexQualityDistribution(m, DD, false); log(" Min %f Max %f", DD.Min(), DD.Max()); @@ -536,7 +536,7 @@ bool FilterMeasurePlugin::perVertexQualityStat(MeshDocument& md, std::map& outputValues) { CMeshO &m = md.mm()->cm; - Distribution DD; + Distribution DD; tri::Stat::ComputePerFaceQualityDistribution(m, DD, false); log(" Min %f Max %f", DD.Min(), DD.Max()); diff --git a/src/meshlabplugins/filter_meshing/meshfilter.cpp b/src/meshlabplugins/filter_meshing/meshfilter.cpp index d3b71f009..e2579c083 100644 --- a/src/meshlabplugins/filter_meshing/meshfilter.cpp +++ b/src/meshlabplugins/filter_meshing/meshfilter.cpp @@ -1337,7 +1337,7 @@ switch(ID(filter)) case 6: tri::UpdateQuality::VertexConstant(m.cm,0); break; } - Histogram H; + Histogram H; tri::Stat::ComputePerVertexQualityHistogram(m.cm,H); tri::UpdateColor::PerVertexQualityRamp(m.cm,H.Percentile(0.1f),H.Percentile(0.9f)); diff --git a/src/meshlabplugins/filter_mls/mlsplugin.cpp b/src/meshlabplugins/filter_mls/mlsplugin.cpp index 4af66d267..492f0f580 100644 --- a/src/meshlabplugins/filter_mls/mlsplugin.cpp +++ b/src/meshlabplugins/filter_mls/mlsplugin.cpp @@ -45,7 +45,7 @@ using namespace GaelMls; using namespace vcg; -typedef Histogram Histogramm; +typedef Histogram Histogramm; // Constructor usually performs only two simple tasks of filling the two lists // - typeList: with all the possible id of the filtering actions diff --git a/src/meshlabplugins/filter_mutualglobal/alignset.cpp b/src/meshlabplugins/filter_mutualglobal/alignset.cpp index a965f36f2..84198b91b 100644 --- a/src/meshlabplugins/filter_mutualglobal/alignset.cpp +++ b/src/meshlabplugins/filter_mutualglobal/alignset.cpp @@ -469,11 +469,11 @@ bool AlignSet::RenderShadowMap(void) glUseProgram(depthPrg); assert(glGetError() == 0); - MESHLAB_SCALAR _near, _far; + Scalarm _near, _far; _near=0.1; _far=10000; - GlShot< vcg::Shot >::GetNearFarPlanes(shotPro, mesh->bbox, _near, _far); + GlShot< vcg::Shot >::GetNearFarPlanes(shotPro, mesh->bbox, _near, _far); //assert(_near <= _far); if(_near <= 0) _near = 0.1; if(_far < _near) _far = 1000; @@ -487,7 +487,7 @@ bool AlignSet::RenderShadowMap(void) //glViewport(0, 0, wt, ht); //glClear(GL_DEPTH_BUFFER_BIT); - GlShot< vcg::Shot >::SetView(shotPro, 0.5*_near, 2*_far); + GlShot< vcg::Shot >::SetView(shotPro, 0.5*_near, 2*_far); vcg::Matrix44f proj_matrix; glGetFloatv(GL_PROJECTION_MATRIX , proj_matrix.V()); @@ -575,11 +575,11 @@ bool AlignSet::RenderMultiShadowMap(void) glUseProgram(depthPrg); assert(glGetError() == 0); - MESHLAB_SCALAR _near, _far; + Scalarm _near, _far; _near=0.1; _far=10000; - GlShot< vcg::Shot >::GetNearFarPlanes(*arcShots[0], mesh->bbox, _near, _far); + GlShot< vcg::Shot >::GetNearFarPlanes(*arcShots[0], mesh->bbox, _near, _far); //assert(_near <= _far); if(_near <= 0) _near = 0.1; if(_far < _near) _far = 1000; @@ -593,7 +593,7 @@ bool AlignSet::RenderMultiShadowMap(void) //glViewport(0, 0, wt, ht); //glClear(GL_DEPTH_BUFFER_BIT); - GlShot< vcg::Shot >::SetView(*arcShots[0], 0.5*_near, 2*_far); + GlShot< vcg::Shot >::SetView(*arcShots[0], 0.5*_near, 2*_far); vcg::Matrix44f proj_matrix; glGetFloatv(GL_PROJECTION_MATRIX , proj_matrix.V()); @@ -678,7 +678,7 @@ bool AlignSet::RenderMultiShadowMap(void) _near=0.1; _far=10000; - GlShot< vcg::Shot >::GetNearFarPlanes(*arcShots[1], mesh->bbox, _near, _far); + GlShot< vcg::Shot >::GetNearFarPlanes(*arcShots[1], mesh->bbox, _near, _far); //assert(_near <= _far); if(_near <= 0) _near = 0.1; if(_far < _near) _far = 1000; @@ -692,7 +692,7 @@ bool AlignSet::RenderMultiShadowMap(void) //glViewport(0, 0, wt, ht); //glClear(GL_DEPTH_BUFFER_BIT); - GlShot< vcg::Shot >::SetView(*arcShots[1], 0.5*_near, 2*_far); + GlShot< vcg::Shot >::SetView(*arcShots[1], 0.5*_near, 2*_far); glGetFloatv(GL_PROJECTION_MATRIX , proj_matrix.V()); proj_matrix.transposeInPlace(); @@ -774,7 +774,7 @@ bool AlignSet::RenderMultiShadowMap(void) _near=0.1; _far=10000; - GlShot< vcg::Shot >::GetNearFarPlanes(*arcShots[2], mesh->bbox, _near, _far); + GlShot< vcg::Shot >::GetNearFarPlanes(*arcShots[2], mesh->bbox, _near, _far); //assert(_near <= _far); if(_near <= 0) _near = 0.1; if(_far < _near) _far = 1000; @@ -788,7 +788,7 @@ bool AlignSet::RenderMultiShadowMap(void) //glViewport(0, 0, wt, ht); //glClear(GL_DEPTH_BUFFER_BIT); - GlShot< vcg::Shot >::SetView(*arcShots[2], 0.5*_near, 2*_far); + GlShot< vcg::Shot >::SetView(*arcShots[2], 0.5*_near, 2*_far); glGetFloatv(GL_PROJECTION_MATRIX , proj_matrix.V()); @@ -942,18 +942,18 @@ void AlignSet::resize(int max_side) { #endif } -void AlignSet::renderScene(vcg::Shot &view, int component, bool save) { +void AlignSet::renderScene(vcg::Shot &view, int component, bool save) { QSize fbosize(wt,ht); QGLFramebufferObjectFormat frmt; frmt.setInternalTextureFormat(GL_RGBA); frmt.setAttachment(QGLFramebufferObject::Depth); QGLFramebufferObject fbo(fbosize,frmt); - MESHLAB_SCALAR _near, _far; + Scalarm _near, _far; _near=0.1; _far=10000; - GlShot< vcg::Shot >::GetNearFarPlanes(view, mesh->bbox, _near, _far); + GlShot< vcg::Shot >::GetNearFarPlanes(view, mesh->bbox, _near, _far); //assert(_near <= _far); if(_near <= 0) _near = 0.1; if(_far < _near) _far = 1000; @@ -966,7 +966,7 @@ void AlignSet::renderScene(vcg::Shot &view, int component, bool glViewport(0, 0, wt, ht); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - GlShot< vcg::Shot >::SetView(view, 0.5*_near, 2*_far); + GlShot< vcg::Shot >::SetView(view, 0.5*_near, 2*_far); // err = glGetError(); diff --git a/src/meshlabplugins/filter_mutualglobal/alignset.h b/src/meshlabplugins/filter_mutualglobal/alignset.h index 2cb1e73f7..0194363d1 100644 --- a/src/meshlabplugins/filter_mutualglobal/alignset.h +++ b/src/meshlabplugins/filter_mutualglobal/alignset.h @@ -33,9 +33,9 @@ class AlignSet { CMeshO* mesh; QImage* image; double imageRatio; - vcg::Shot shot; + vcg::Shot shot; vcg::Box3 box; - vcg::Shot shotPro; + vcg::Shot shotPro; QImage* imagePro; vcg::Matrix44 shadPro; QList *correspList; //List that includes corresponces involving the model @@ -44,7 +44,7 @@ class AlignSet { QImage comb; //Node* node; std::vector arcImages; - std::vector*> arcShots; + std::vector*> arcShots; std::vector arcMI; std::vector> prjMats; @@ -83,7 +83,7 @@ class AlignSet { bool setFocal(double f); //return false if unchanged void setPixelSizeMm(double ccdWidth); - void renderScene(vcg::Shot& shot, int component, bool save=false); + void renderScene(vcg::Shot& shot, int component, bool save=false); void readRender(int component); void drawMeshPoints();