Corrected IsOrientedMesh. After the templating of the swapedge it did not worked any more....

Added Texture management to the FlipMesh
This commit is contained in:
Paolo Cignoni 2006-12-01 00:00:56 +00:00
parent f48e5bc1dd
commit fcc1187856
1 changed files with 12 additions and 4 deletions

View File

@ -24,6 +24,9 @@
History History
$Log: not supported by cvs2svn $ $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 Revision 1.43 2006/11/09 17:26:24 cignoni
Corrected RemoveNonManifoldFace Corrected RemoveNonManifoldFace
@ -932,7 +935,7 @@ private:
if (!fpaux->IsS()) if (!fpaux->IsS())
{ {
face::SwapEdge<FaceType,false>(*fpaux, iaux); face::SwapEdge<FaceType,true>(*fpaux, iaux);
assert(CheckOrientation(*fpaux, iaux)); assert(CheckOrientation(*fpaux, iaux));
} }
else else
@ -957,12 +960,17 @@ private:
if (!Orientable) break; 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) static void FlipMesh(MeshType &m)
{ {
for (FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi) for (FaceIterator fi = m.face.begin(); fi != m.face.end(); ++fi) if(!(*fi).IsD())
face::SwapEdge<FaceType,false>((*fi), 0); {
face::SwapEdge<FaceType,false>((*fi), 0);
if (HasPerWedgeTexture(m))
swap((*fi).WT(0),(*fi).WT(1));
}
} }
static bool SelfIntersections(MeshType &m, std::vector<FaceType*> &ret) static bool SelfIntersections(MeshType &m, std::vector<FaceType*> &ret)
{ {
//assert(FaceType::HasMark()); // Needed by the UG //assert(FaceType::HasMark()); // Needed by the UG