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

@ -121,7 +121,6 @@ class EdgeCollapse
for( x.f = v0->VFp(), x.z = v0->VFi(); x.f!=0; ++x) for( x.f = v0->VFp(), x.z = v0->VFi(); x.f!=0; ++x)
{ {
int zv1 = -1; int zv1 = -1;
for(int j=0;j<3;++j) for(int j=0;j<3;++j)
@ -243,15 +242,15 @@ class EdgeCollapse
f01->FFi(If01)=If00; f01->FFi(If01)=If00;
} }
for(i=AV01().begin();i!=AV01().end();++i) for(i=AV01().begin();i!=AV01().end();++i)
{ {
FaceType * f = ((*i).f); FaceType & f = *((*i).f);
assert(f->V((*i).z) == c.V(0)); assert(f.V((*i).z) == c.V(0));
vcg::face::VFDetach(*f,((*i).z+1)%3); vcg::face::VFDetach(f,(*i).z);
vcg::face::VFDetach(*((*i).f),((*i).z+2)%3); vcg::face::VFDetach(f,((*i).z+1)%3);
((*i).f)->SetD(); vcg::face::VFDetach(f,((*i).z+2)%3);
f.SetD();
n_face_del++; n_face_del++;
} }
@ -263,9 +262,9 @@ class EdgeCollapse
(*i).f->VFi((*i).z) = (*i).f->V((*i).z)->VFi(); (*i).f->VFi((*i).z) = (*i).f->V((*i).z)->VFi();
(*i).f->V((*i).z)->VFp() = (*i).f; (*i).f->V((*i).z)->VFp() = (*i).f;
(*i).f->V((*i).z)->VFi() = (*i).z; (*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;*/ /*TriMeshType::VertexType nv;*/
//* c.v[1]->Merge(*c.v[0]); //* c.v[1]->Merge(*c.v[0]);
c.V(0)->SetD(); c.V(0)->SetD();