Splitted IsComplexManifold in IsTwoManifoldFace and IsTwoManifoldVertex
This commit is contained in:
parent
6de3303285
commit
ac8493bbad
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.28 2005/12/21 14:11:59 corsini
|
||||||
|
Out the number of self intersection
|
||||||
|
|
||||||
Revision 1.27 2005/12/21 13:26:58 corsini
|
Revision 1.27 2005/12/21 13:26:58 corsini
|
||||||
Re-add save xml feature
|
Re-add save xml feature
|
||||||
|
|
||||||
|
@ -617,7 +620,7 @@ int main(int argc, char ** argv)
|
||||||
tri::UpdateTopology<CMesh>::VertexFace(m);
|
tri::UpdateTopology<CMesh>::VertexFace(m);
|
||||||
|
|
||||||
// IS MANIFOLD?
|
// IS MANIFOLD?
|
||||||
mi.Manifold = tri::Clean<CMesh>::IsComplexManifold(m);
|
mi.Manifold = tri::Clean<CMesh>::IsTwoManifoldFace(m) && tri::Clean<CMesh>::IsTwoManifoldVertex(m);
|
||||||
|
|
||||||
// COUNT EDGES
|
// COUNT EDGES
|
||||||
tri::Clean<CMesh>::CountEdges(m, mi.count_e, mi.boundary_e);
|
tri::Clean<CMesh>::CountEdges(m, mi.count_e, mi.boundary_e);
|
||||||
|
|
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.26 2005/12/21 14:15:03 corsini
|
||||||
|
Remove printf
|
||||||
|
|
||||||
Revision 1.25 2005/12/21 13:09:03 corsini
|
Revision 1.25 2005/12/21 13:09:03 corsini
|
||||||
Modify genus computation
|
Modify genus computation
|
||||||
|
|
||||||
|
@ -281,11 +284,10 @@ namespace vcg {
|
||||||
* number of face found have to be the same of the number of
|
* number of face found have to be the same of the number of
|
||||||
* face found with the VF walk trough.
|
* face found with the VF walk trough.
|
||||||
*/
|
*/
|
||||||
static bool IsComplexManifold( MeshType & m )
|
static bool IsTwoManifoldFace( MeshType & m )
|
||||||
{
|
{
|
||||||
bool flagManifold = true;
|
bool flagManifold = true;
|
||||||
|
|
||||||
VertexIterator vi;
|
|
||||||
FaceIterator fi;
|
FaceIterator fi;
|
||||||
|
|
||||||
// First Test
|
// First Test
|
||||||
|
@ -303,11 +305,14 @@ namespace vcg {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return flagManifold;
|
||||||
|
}
|
||||||
|
|
||||||
// Second Test
|
static bool IsTwoManifoldVertex( MeshType & m )
|
||||||
if (flagManifold)
|
{
|
||||||
{
|
VertexIterator vi;
|
||||||
assert(m.HasVFTopology());
|
bool flagManifold = true;
|
||||||
|
assert(m.HasVFTopology());
|
||||||
|
|
||||||
face::VFIterator<FaceType> vfi;
|
face::VFIterator<FaceType> vfi;
|
||||||
int starSizeFF;
|
int starSizeFF;
|
||||||
|
@ -335,7 +340,6 @@ namespace vcg {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return flagManifold;
|
return flagManifold;
|
||||||
}
|
}
|
||||||
|
@ -616,6 +620,7 @@ namespace vcg {
|
||||||
|
|
||||||
static void IsOrientedMesh(MeshType &m, bool &Oriented, bool &Orientable)
|
static void IsOrientedMesh(MeshType &m, bool &Oriented, bool &Orientable)
|
||||||
{
|
{
|
||||||
|
assert(&Oriented != &Orientable);
|
||||||
// This algorithms requires FF topology
|
// This algorithms requires FF topology
|
||||||
assert(m.HasFFTopology());
|
assert(m.HasFFTopology());
|
||||||
|
|
||||||
|
@ -654,11 +659,11 @@ namespace vcg {
|
||||||
fpaux = fp->FFp(j);
|
fpaux = fp->FFp(j);
|
||||||
iaux = fp->FFi(j);
|
iaux = fp->FFi(j);
|
||||||
|
|
||||||
if (!fpaux->IsD() && fpaux != fp)
|
if (!fpaux->IsD() && fpaux != fp && face::IsManifold<FaceType>(*fp, j))
|
||||||
{
|
{
|
||||||
if (!CheckOrientation(*fpaux, iaux))
|
if (!CheckOrientation(*fpaux, iaux))
|
||||||
{
|
{
|
||||||
Oriented = false;
|
Oriented = false;
|
||||||
|
|
||||||
if (!fpaux->IsS())
|
if (!fpaux->IsS())
|
||||||
{
|
{
|
||||||
|
@ -666,7 +671,10 @@ namespace vcg {
|
||||||
assert(CheckOrientation(*fpaux, iaux));
|
assert(CheckOrientation(*fpaux, iaux));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
Orientable = false;
|
Orientable = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// put the oriented face into the stack
|
// put the oriented face into the stack
|
||||||
|
@ -681,8 +689,7 @@ namespace vcg {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Orientable)
|
if (!Orientable) break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue