From fcc1187856c1a59299e1ac6e1992d043cd10f0f6 Mon Sep 17 00:00:00 2001 From: cignoni Date: Fri, 1 Dec 2006 00:00:56 +0000 Subject: [PATCH] Corrected IsOrientedMesh. After the templating of the swapedge it did not worked any more.... Added Texture management to the FlipMesh --- vcg/complex/trimesh/clean.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/vcg/complex/trimesh/clean.h b/vcg/complex/trimesh/clean.h index b6f456b7..fc12894c 100644 --- a/vcg/complex/trimesh/clean.h +++ b/vcg/complex/trimesh/clean.h @@ -24,6 +24,9 @@ History $Log: not supported by cvs2svn $ +Revision 1.44 2006/11/27 10:36:35 cignoni +Added IsSizeConsistent + Revision 1.43 2006/11/09 17:26:24 cignoni Corrected RemoveNonManifoldFace @@ -932,7 +935,7 @@ private: if (!fpaux->IsS()) { - face::SwapEdge(*fpaux, iaux); + face::SwapEdge(*fpaux, iaux); assert(CheckOrientation(*fpaux, iaux)); } else @@ -957,12 +960,17 @@ private: if (!Orientable) break; } } - + /// Flip the orientation of the whole mesh flipping all the faces (by swapping the first two vertices) static void FlipMesh(MeshType &m) { - for (FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi) - face::SwapEdge((*fi), 0); + for (FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi) if(!(*fi).IsD()) + { + face::SwapEdge((*fi), 0); + if (HasPerWedgeTexture(m)) + swap((*fi).WT(0),(*fi).WT(1)); + } } + static bool SelfIntersections(MeshType &m, std::vector &ret) { //assert(FaceType::HasMark()); // Needed by the UG