From 87b79eecad8cb160313dc2bda611709bee0983c5 Mon Sep 17 00:00:00 2001 From: nicopietroni Date: Fri, 6 Aug 2004 01:47:57 +0000 Subject: [PATCH] corrected errors on vfappend --- vcg/simplex/face/topology.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/vcg/simplex/face/topology.h b/vcg/simplex/face/topology.h index 8e38c3df..27c4a66c 100644 --- a/vcg/simplex/face/topology.h +++ b/vcg/simplex/face/topology.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.12 2004/08/05 22:27:00 pietroni +added VFAppend funtion + Revision 1.10 2004/07/27 09:49:23 cignoni Removed warning about postfix incremnet of VFIterator @@ -261,12 +264,16 @@ template void VFAppend(FaceType* & f, int z) { FaceType::VertexType *v=f->V(z); - FaceType *f0=v->VFp(); - int z0=v->VFi(); + if (v->VFp()!=0) + { + FaceType *f0=v->VFp(); + int z0=v->VFi(); + //append + f->VFp(z)=f0; + f->VFi(z)=z0; + } v->VFp()=f; v->VFi()=z; - f->VFp(z)=f0; - f->VFi(z)=z0; } /*@}*/