made unique the list of seeds to start from for isotropic remeshing in case of adaptive meshing

This commit is contained in:
nico 2020-12-19 17:23:29 +11:00
parent ed5ae26e42
commit d991f12595
1 changed files with 6 additions and 0 deletions

View File

@ -379,6 +379,8 @@ private:
tri::RequirePerVertexQuality(m);
tri::UpdateTopology<MeshType>::FaceFace(m);
// tri::UpdateFlags<MeshType>::VertexClearV(m);
for (size_t i=0;i<m.vert.size();i++)
m.vert[i].IMark()=0;
std::vector<VertexPointer> seeds;
ForEachFace(m, [&] (FaceType & f) {
@ -392,6 +394,10 @@ private:
}
});
std::sort(seeds.begin(),seeds.end());
auto last=std::unique(seeds.begin(),seeds.end());
seeds.erase(last, seeds.end());
tri::EuclideanDistance<MeshType> eu;
tri::Geodesic<MeshType>::PerVertexDijkstraCompute(m, seeds, eu);
tri::Smooth<MeshType>::VertexQualityLaplacian(m, 2);