From 5e36e051a440fbe90ed7e2be9a9fef5c366b29c8 Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 23 Jul 2013 07:36:40 +0000 Subject: [PATCH] improved comments and corrected a small bug in the topology sample --- apps/sample/trimesh_topology/trimesh_topology.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/sample/trimesh_topology/trimesh_topology.cpp b/apps/sample/trimesh_topology/trimesh_topology.cpp index d72116aa..7f76bdef 100644 --- a/apps/sample/trimesh_topology/trimesh_topology.cpp +++ b/apps/sample/trimesh_topology/trimesh_topology.cpp @@ -50,8 +50,8 @@ int main(int ,char ** ) //update the face-face topology vcg::tri::UpdateTopology::FaceFace(m); - // Now for each face the F() members are meaningful - + // Now for each face the FFp() FFi() members are correctly initialized + if(face::IsBorder(m.face[0],0)) printf("Edge 0 of face 0 is a border\n"); else printf("Edge 0 of face 0 is NOT a border\n"); // always this path! @@ -76,7 +76,7 @@ int main(int ,char ** ) { for(int j=0;j<3;j++) { - if ( face::IsBorder(*fi,j) && tri::IsMarked(m,&*fi)) + if ( face::IsBorder(*fi,j) && !tri::IsMarked(m,&*fi)) { tri::Mark(m,&*fi); hei.Set(&*fi,j,fi->V(j)); @@ -84,7 +84,7 @@ int main(int ,char ** ) do { BorderEdgeNum++; - he.NextB(); // next edge along a border + he.NextB(); // next pos along a border tri::Mark(m,he.f); } while (he.f!=hei.f);