VFDetach corrected
This commit is contained in:
parent
16e27ee1e8
commit
0243e21354
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.7 2004/05/12 12:23:23 cignoni
|
||||||
|
Conformed C++ syntax to GCC requirements
|
||||||
|
|
||||||
Revision 1.6 2004/05/11 16:03:18 ganovelli
|
Revision 1.6 2004/05/11 16:03:18 ganovelli
|
||||||
changed from "thi" to "&f" in Vfdetach
|
changed from "thi" to "&f" in Vfdetach
|
||||||
|
|
||||||
|
|
@ -218,27 +221,27 @@ void Swap (SwapFaceType &f, const int z )
|
||||||
template <class FaceType>
|
template <class FaceType>
|
||||||
void VFDetach(FaceType & f, int z)
|
void VFDetach(FaceType & f, int z)
|
||||||
{
|
{
|
||||||
|
printf("detach %d \n",&f);
|
||||||
if(f.V(z)->VFp()==&f ) //if it is the first face detach from the begin
|
if(f.V(z)->VFp()==&f ) //if it is the first face detach from the begin
|
||||||
{
|
{
|
||||||
int fz = f.V(z)->VFb();
|
int fz = f.V(z)->VFi();
|
||||||
f.V(z)->VFb() = f.VFp(fz);
|
f.V(z)->VFp() = f.VFp(fz);
|
||||||
f.V(z)->VFi() = f.VFi(fz);
|
f.V(z)->VFi() = f.VFi(fz);
|
||||||
}
|
}
|
||||||
else // scan the list of faces in order to finde the current face f to be detached
|
else // scan the list of faces in order to finde the current face f to be detached
|
||||||
{
|
{
|
||||||
VEdgePosB<FACE_TYPE> x,y;
|
VFIterator<FaceType> x(f.V(z)->VFp(),f.V(z)->VFi());
|
||||||
Pos< FaceType > x(V(z)->VFb(),V(z)->VFi());
|
VFIterator<FaceType> y;
|
||||||
Pos< FaceType > y;
|
|
||||||
|
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
y = x;
|
y = x;
|
||||||
x.NextF();
|
x++;
|
||||||
assert(x.f!=0);
|
assert(x.f!=0);
|
||||||
if(x.f==&f) // found!
|
if(x.f==&f) // found!
|
||||||
{
|
{
|
||||||
y.f->FFp(y.z) = f.FFp(z);
|
y.f->VFp(y.z) = f.VFp(z);
|
||||||
y.f->FFi(y.z) = f.FFi(z);
|
y.f->VFi(y.z) = f.VFi(z);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue