Minor changes
This commit is contained in:
parent
4f523817c1
commit
213fe182d5
|
@ -24,6 +24,9 @@
|
||||||
History
|
History
|
||||||
|
|
||||||
$Log: not supported by cvs2svn $
|
$Log: not supported by cvs2svn $
|
||||||
|
Revision 1.11 2005/11/16 15:59:46 cignoni
|
||||||
|
Changed name of the component from <Flag> to <BitFlags>
|
||||||
|
|
||||||
Revision 1.10 2005/11/14 09:21:07 cignoni
|
Revision 1.10 2005/11/14 09:21:07 cignoni
|
||||||
Heavily restructured the code of Trimeshinfo.
|
Heavily restructured the code of Trimeshinfo.
|
||||||
Now divided the collecting part from the reporting one (xml and ascii)
|
Now divided the collecting part from the reporting one (xml and ascii)
|
||||||
|
@ -81,7 +84,7 @@ Added Standard comments
|
||||||
#include <stack>
|
#include <stack>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include<vcg/simplex/face/with/afav.h>
|
|
||||||
#include<vcg/simplex/face/pos.h>
|
#include<vcg/simplex/face/pos.h>
|
||||||
#include<vcg/complex/trimesh/base.h>
|
#include<vcg/complex/trimesh/base.h>
|
||||||
|
|
||||||
|
@ -153,6 +156,12 @@ struct MeshInfo
|
||||||
bool SelfIntersect;
|
bool SelfIntersect;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void initMeshInfo(MeshInfo &mi)
|
||||||
|
{
|
||||||
|
mi.vn = mi.fn = mi.count_e = mi.boundary_e = mi.count_fd = mi.count_uv = mi.numholes = mi.BEdges =
|
||||||
|
mi.numcomponents = mi.Genus = mi.dv = 0;
|
||||||
|
mi.Volume = 0.;
|
||||||
|
}
|
||||||
void PrintAsciiInfo(MeshInfo &mi)
|
void PrintAsciiInfo(MeshInfo &mi)
|
||||||
{
|
{
|
||||||
printf("\t Mesh info:\n");
|
printf("\t Mesh info:\n");
|
||||||
|
@ -240,6 +249,7 @@ int main(int argc,char ** argv)
|
||||||
string SaveName;
|
string SaveName;
|
||||||
|
|
||||||
MeshInfo mi;
|
MeshInfo mi;
|
||||||
|
initMeshInfo(mi);
|
||||||
printf("-------------------------------\n"
|
printf("-------------------------------\n"
|
||||||
" TriMeshInfo V.1.2 \n"
|
" TriMeshInfo V.1.2 \n"
|
||||||
" http://vcg.isti.cnr.it\n"
|
" http://vcg.isti.cnr.it\n"
|
||||||
|
@ -273,8 +283,18 @@ int main(int argc,char ** argv)
|
||||||
OpenMesh(mi.FileName.c_str(),m);
|
OpenMesh(mi.FileName.c_str(),m);
|
||||||
mi.vn=m.vn; mi.fn=m.fn;
|
mi.vn=m.vn; mi.fn=m.fn;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// DEGENERATED FACES
|
||||||
|
mi.count_fd = tri::Clean<CMesh>::DegeneratedFaces(m);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
vcg::tri::UpdateTopology<CMesh>::FaceFace(m);
|
vcg::tri::UpdateTopology<CMesh>::FaceFace(m);
|
||||||
|
|
||||||
|
// UNREFERENCED VERTEX
|
||||||
|
mi.count_uv = tri::Clean<CMesh>::DetectUnreferencedVertex(m);
|
||||||
|
|
||||||
// IS MANIFOLD
|
// IS MANIFOLD
|
||||||
tri::Clean<CMesh>::Initialize(m);
|
tri::Clean<CMesh>::Initialize(m);
|
||||||
mi.Manifold = tri::Clean<CMesh>::IsComplexManifold(m);
|
mi.Manifold = tri::Clean<CMesh>::IsComplexManifold(m);
|
||||||
|
@ -282,11 +302,7 @@ int main(int argc,char ** argv)
|
||||||
// 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);
|
||||||
|
|
||||||
// DEGENERATED FACES
|
|
||||||
mi.count_fd = tri::Clean<CMesh>::DegeneratedFaces(m);
|
|
||||||
|
|
||||||
// UNREFERENCED VERTEX
|
|
||||||
mi.count_uv = tri::Clean<CMesh>::DetectUnreferencedVertex(m);
|
|
||||||
|
|
||||||
// HOLES COUNT
|
// HOLES COUNT
|
||||||
if(mi.Manifold)
|
if(mi.Manifold)
|
||||||
|
|
Loading…
Reference in New Issue