From f55d7a0048d98befe3e54b27a63cc3d95b4d3abc Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 2 Sep 2010 22:23:10 +0000 Subject: [PATCH] removed a small bug in the link condition --- vcg/complex/trimesh/edge_collapse.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vcg/complex/trimesh/edge_collapse.h b/vcg/complex/trimesh/edge_collapse.h index 48480dcf..afde69f8 100644 --- a/vcg/complex/trimesh/edge_collapse.h +++ b/vcg/complex/trimesh/edge_collapse.h @@ -206,14 +206,14 @@ class EdgeCollapse } } - // Final loop to find cardinality of lk( V0-V1 ) + // Final loop to find cardinality of Lk( V0-V1 ) // Note that Lk(edge) is only a set of vertices. std::vector LkEdge; for( vfi = VFIterator(pos.V(0)); !vfi.End(); ++vfi) { - if(vfi.V1() == pos.V(1) ) LkEdge.push_back(pos.V(2)); - if(vfi.V2() == pos.V(1) ) LkEdge.push_back(pos.V(1)); + if(vfi.V1() == pos.V(1) ) LkEdge.push_back(vfi.V2()); + if(vfi.V2() == pos.V(1) ) LkEdge.push_back(vfi.V1()); } // if the collapsing edge was a boundary edge, we must add the dummy vertex.