a VFDetach was missing

This commit is contained in:
ganovelli 2004-10-12 15:43:26 +00:00
parent 9e35226e77
commit 047ce8854e
1 changed files with 9 additions and 10 deletions

View File

@ -113,15 +113,14 @@ class EdgeCollapse
VertexType * v0 = p.V(0);
VertexType * v1 = p.V(1);
AV0().clear(); // Facce incidenti in v0
AV1().clear(); // Facce incidenti in v1
AV0().clear(); // Facce incidenti in v0
AV1().clear(); // Facce incidenti in v1
AV01().clear(); // Facce incidenti in v0 e v1
VFI x;
for( x.f = v0->VFp(), x.z = v0->VFi(); x.f!=0; ++x)
{
int zv1 = -1;
for(int j=0;j<3;++j)
@ -243,15 +242,15 @@ class EdgeCollapse
f01->FFi(If01)=If00;
}
for(i=AV01().begin();i!=AV01().end();++i)
{
FaceType * f = ((*i).f);
assert(f->V((*i).z) == c.V(0));
FaceType & f = *((*i).f);
assert(f.V((*i).z) == c.V(0));
vcg::face::VFDetach(*f,((*i).z+1)%3);
vcg::face::VFDetach(*((*i).f),((*i).z+2)%3);
((*i).f)->SetD();
vcg::face::VFDetach(f,(*i).z);
vcg::face::VFDetach(f,((*i).z+1)%3);
vcg::face::VFDetach(f,((*i).z+2)%3);
f.SetD();
n_face_del++;
}
@ -263,9 +262,9 @@ class EdgeCollapse
(*i).f->VFi((*i).z) = (*i).f->V((*i).z)->VFi();
(*i).f->V((*i).z)->VFp() = (*i).f;
(*i).f->V((*i).z)->VFi() = (*i).z;
vcg::Quality((*i).f->P(0),(*i).f->P(1),(*i).f->P(2));
}
/*TriMeshType::VertexType nv;*/
//* c.v[1]->Merge(*c.v[0]);
c.V(0)->SetD();