diff --git a/vcg/complex/algorithms/point_sampling.h b/vcg/complex/algorithms/point_sampling.h index bc33cff1..10047237 100644 --- a/vcg/complex/algorithms/point_sampling.h +++ b/vcg/complex/algorithms/point_sampling.h @@ -206,7 +206,7 @@ public: if(tri::HasPerVertexQuality(m) ) m.vert.back().Q() = f.cV(0)->Q()*p[0] + f.cV(1)->Q()*p[1] + f.cV(2)->Q()*p[2]; } -}; // end class BaseSampler +}; // end class MeshSampler @@ -2311,7 +2311,7 @@ void PoissonPruning(MeshType &m, // the mesh that has to be pruned tri::UpdateBounding::Box(m); BaseSampler pdSampler; tri::SurfaceSampling::PoissonDiskPruning(pdSampler, m, radius,pp); - std::swap(pdSampler.sampleVec,poissonSamples); + poissonSamples = pdSampler.sampleVec; } diff --git a/vcg/complex/algorithms/update/flag.h b/vcg/complex/algorithms/update/flag.h index 722f9992..1ff86976 100644 --- a/vcg/complex/algorithms/update/flag.h +++ b/vcg/complex/algorithms/update/flag.h @@ -470,24 +470,24 @@ public: } } - /// \brief Marks feature edges according to border flag. - /// Actually it marks as fauxedges all the non border edges, - /// - static void FaceEdgeSelBorder(MeshType &m) - { - RequirePerFaceFlags(m); - RequireFFAdjacency(m); - //initially Nothing is faux (e.g all crease) - FaceClearFaceEdgeS(m); - // Then mark faux only if the signed angle is the range. - for(FaceIterator fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD()) - { - for(int z=0;z<(*fi).VN();++z) - { - if(!face::IsBorder(*fi,z) ) (*fi).SetFaceEdgeS(z); - } - } - } + /// \brief Selects feature edges according to Face adjacency. + /// + static void FaceEdgeSelBorder(MeshType &m) + { + RequirePerFaceFlags(m); + RequireFFAdjacency(m); + //initially Nothing is selected + FaceClearFaceEdgeS(m); + for (FaceIterator fi=m.face.begin(); fi!=m.face.end();++fi) + if (!fi->IsD()) + { + for (int z=0; z<(*fi).VN(); ++z) + { + if (face::IsBorder(*fi,z)) + fi->SetFaceEdgeS(z); + } + } + } /// \brief Marks feature edges according to a given angle /// Actually it uses the face_edge selection bit on faces,