diff --git a/vcg/complex/trimesh/update/curvature_fitting.h b/vcg/complex/trimesh/update/curvature_fitting.h index e320e11c..e5ed5ab8 100644 --- a/vcg/complex/trimesh/update/curvature_fitting.h +++ b/vcg/complex/trimesh/update/curvature_fitting.h @@ -127,7 +127,7 @@ class Quadric return 2.0*c(); } - static Quadric fit(vector VV) + static Quadric fit(std::vector VV) { assert(VV.size() >= 5); Eigen::MatrixXf A(VV.size(),5); @@ -160,7 +160,7 @@ class Quadric } - static vector computeReferenceFrames(VertexTypeP vi) + static std::vector computeReferenceFrames(VertexTypeP vi) { vcg::face::VFIterator vfi(vi); @@ -171,7 +171,7 @@ class Quadric assert(fabs(x * vi->N()) < 0.1); - vector res(3); + std::vector res(3); res[0] = x; res[1] = (vi->N() ^ res[0]).Normalize(); @@ -180,10 +180,10 @@ class Quadric return res; } - static set getSecondRing(VertexTypeP v) + static std::set getSecondRing(VertexTypeP v) { - set ris; - set coords; + std::set ris; + std::set coords; vcg::face::VFIterator vvi(v); for(;!vvi.End();++vvi) @@ -194,22 +194,22 @@ class Quadric ris.insert(vvi2.F()->V((vvi2.I()+1)%3)); } } - - for(typename set::iterator it = ris.begin(); it != ris.end(); ++it) + typename std::set::iterator it; + for(it = ris.begin(); it != ris.end(); ++it) coords.insert((*it)->P()); return coords; } - static Quadric fitQuadric(VertexTypeP v, vector& ref) + static Quadric fitQuadric(VertexTypeP v, std::vector& ref) { - set ring = getSecondRing(v); + std::set ring = getSecondRing(v); if (ring.size() < 5) return Quadric(1,1,1,1,1); - vector points; + std::vector points; - typename set::iterator b = ring.begin(); - typename set::iterator e = ring.end(); + typename std::set::iterator b = ring.begin(); + typename std::set::iterator e = ring.end(); while(b != e) { @@ -229,11 +229,9 @@ class Quadric static void computeCurvature(MeshType & m) { - assert(VertexType::HasVFAdjacency()); - assert(FaceType::HasFFAdjacency()); - assert(FaceType::HasFaceNormal()); + assert(vcg::tri::HasVFAdjacency(m)); - UpdateTopology::VertexFace(m); + vcg::tri::UpdateTopology::VertexFace(m); vcg::tri::UpdateNormals::PerVertexAngleWeighted(m); vcg::tri::UpdateNormals::NormalizeVertex(m); @@ -242,7 +240,7 @@ class Quadric VertexIterator vi; for(vi = m.vert.begin(); vi!=m.vert.end(); ++vi ) { - vector ref = computeReferenceFrames(&*vi); + std::vector ref = computeReferenceFrames(&*vi); Quadric q = fitQuadric(&*vi,ref); double a = q.a();