From c680da71f9868f308e88f248e7aba27175884fbe Mon Sep 17 00:00:00 2001 From: cignoni Date: Mon, 4 Dec 2006 16:06:12 +0000 Subject: [PATCH] Added FFlip() and const VFlip() operators --- vcg/simplex/face/pos.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/vcg/simplex/face/pos.h b/vcg/simplex/face/pos.h index 808db7d5..baed4055 100644 --- a/vcg/simplex/face/pos.h +++ b/vcg/simplex/face/pos.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.24 2006/11/13 01:57:23 cignoni +Added a missing prototype to ismanifold + Revision 1.23 2006/11/09 17:22:56 cignoni Added ismanifold @@ -276,6 +279,24 @@ public: else return f->V((z+1)%3); } + // return the vertex that it should have if we make FlipV; + const VertexType *VFlip() const + { + assert(f->cV((z+2)%3)!=v && (f->cV((z+1)%3)==v || f->cV((z+0)%3)==v)); + if(f->cV((z+1)%3)==v) return f->cV((z+0)%3); + else return f->cV((z+1)%3); + } + + // return the face that it should have if we make FlipF; + const FaceType *FFlip() const + { + assert( f->FFp(z)->FFp(f->FFi(z))==f ); + assert(f->V((z+2)%3)!=v && (f->V((z+1)%3)==v || f->V((z+0)%3)==v)); + FaceType *nf=f->FFp(z); + return nf; + } + + // Trova il prossimo half-edge di bordo (nhe) // tale che // --nhe.f adiacente per vertice a he.f