From dd520b4fc429be0e19b92121faa432800778e4cc Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 9 Oct 2012 07:12:31 +0000 Subject: [PATCH] Cleaned up all a bit all the samples. Now they compile with the upcoming changes... --- .../aabb_binary_tree/aabb_binary_tree.cpp | 20 +--- apps/sample/sample.pro | 41 +++---- .../trimesh_attribute/trimesh_attribute.cpp | 30 +++-- .../trimesh_ball_pivoting.cpp | 2 +- apps/sample/trimesh_base/trimesh_base.cpp | 2 +- .../trimesh_clustering/trimesh_clustering.cpp | 38 ++++--- apps/sample/trimesh_edge/trimesh_edge.cpp | 8 +- apps/sample/trimesh_hole/trimesh_hole.cpp | 18 +-- .../trimesh_intersection.cpp | 18 +-- .../trimesh_optional/trimesh_optional.cpp | 21 ++-- apps/sample/trimesh_refine/trimesh_refine.cpp | 12 +- apps/sample/trimesh_smooth/trimesh_smooth.cpp | 36 +++--- .../trimesh_topology/trimesh_topology.cpp | 104 ++++++++++-------- .../trimesh_topology/trimesh_topology.pro | 2 + 14 files changed, 169 insertions(+), 183 deletions(-) diff --git a/apps/sample/aabb_binary_tree/aabb_binary_tree.cpp b/apps/sample/aabb_binary_tree/aabb_binary_tree.cpp index 74c6a8d5..e50de8c0 100644 --- a/apps/sample/aabb_binary_tree/aabb_binary_tree.cpp +++ b/apps/sample/aabb_binary_tree/aabb_binary_tree.cpp @@ -5,17 +5,13 @@ #include // vcg headers -//#include -//#include -#include -#include -#include #include #include +#include #include #include -#include +#include #include #include @@ -33,10 +29,6 @@ struct MyUsedTypes : public vcg::UsedTypes< vcg::Use ::AsVertexType, class AVertex : public Vertex< MyUsedTypes, vertex::Normal3f, vertex::Coord3f,vertex::BitFlags >{}; class AFace : public Face< MyUsedTypes, face::VertexRef, face::Normal3f, face::EdgePlane, face::BitFlags> {}; - -//class AVertex : public vcg::Vertex< AScalarType, AEdge, AFace > { }; -//class AFace : public vcg::FaceRTFMFN< AVertex, AEdge, AFace > { }; - class AMesh : public vcg::tri::TriMesh< std::vector, std::vector > { }; typedef vcg::AABBBinaryTreeIndex AIndex; @@ -48,8 +40,8 @@ static void CreateMesh(void) { vcg::tri::Dodecahedron(gMesh); vcg::tri::UpdateFlags::Clear(gMesh); - vcg::tri::UpdateNormals::PerVertexNormalized(gMesh); - vcg::tri::UpdateEdges::Set(gMesh); + vcg::tri::UpdateNormal::PerVertexNormalized(gMesh); + vcg::tri::UpdateComponentEP::Set(gMesh); } static void SetIndex(void) { @@ -57,7 +49,7 @@ static void SetIndex(void) { } static void TestClosest(void) { - vcg::face::PointDistanceFunctor getPtDist; + vcg::face::PointDistanceEPFunctor getPtDist; const AIndex::CoordType queryPoint((AIndex::ScalarType)0, (AIndex::ScalarType)0, (AIndex::ScalarType)0); const AIndex::ScalarType maxDist = std::numeric_limits::max(); @@ -81,7 +73,7 @@ static void TestClosest(void) { } static void TestKClosest(void) { - vcg::face::PointDistanceFunctor getPtDist; + vcg::face::PointDistanceEPFunctor getPtDist; const unsigned int k = 10; const AIndex::CoordType queryPoint((AIndex::ScalarType)0, (AIndex::ScalarType)0, (AIndex::ScalarType)0); const AIndex::ScalarType maxDist = std::numeric_limits::max(); diff --git a/apps/sample/sample.pro b/apps/sample/sample.pro index efbb31d4..2209e870 100644 --- a/apps/sample/sample.pro +++ b/apps/sample/sample.pro @@ -1,23 +1,18 @@ -###################################################################### -# Hand made pro. -###################################################################### - -TEMPLATE = subdirs -SUBDIRS = trimesh_base \ - trimesh_topology\ - trimesh_smooth \ - trimesh_refine \ - trimesh_clustering \ - trimesh_isosurface \ - trimesh_join \ - trimesh_optional \ - trimesh_intersection \ - trimesh_ball_pivoting \ - trimesh_hole \ - polygonmesh_base \ - aabb_binary_tree \ - trimesh_attribute - -sources.files = *.pro -sources.path = . -INSTALLS += sources + +TEMPLATE = subdirs +SUBDIRS = trimesh_base \ + trimesh_topology\ + trimesh_smooth \ + trimesh_refine \ + trimesh_clustering \ + trimesh_isosurface \ + trimesh_join \ + trimesh_edge \ + trimesh_optional \ + trimesh_intersection \ + trimesh_ball_pivoting \ + trimesh_hole \ + polygonmesh_base \ + aabb_binary_tree \ + trimesh_attribute + diff --git a/apps/sample/trimesh_attribute/trimesh_attribute.cpp b/apps/sample/trimesh_attribute/trimesh_attribute.cpp index 62bf3fd9..2796fa74 100644 --- a/apps/sample/trimesh_attribute/trimesh_attribute.cpp +++ b/apps/sample/trimesh_attribute/trimesh_attribute.cpp @@ -1,11 +1,27 @@ +/**************************************************************************** +* VCGLib o o * +* Visual and Computer Graphics Library o o * +* _ O _ * +* Copyright(C) 2004-2012 \/)\/ * +* Visual Computing Lab /\/| * +* ISTI - Italian National Research Council | * +* \ * +* All rights reserved. * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * +* for more details. * +* * +****************************************************************************/ -#include -#include -#include -#include #include -#include - class MyEdge; class MyFace; @@ -71,6 +87,4 @@ int main() vcg::tri::Allocator::DeletePerFaceAttribute(m,blocked_hf); res = vcg::tri::Allocator::IsValidHandle(m,ih);printf("%d\n",res); res = vcg::tri::Allocator::IsValidHandle(m,blocked_hf);printf("%d\n",res); - - } diff --git a/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp b/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp index d91f4421..c37a4bb6 100644 --- a/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp +++ b/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp @@ -85,7 +85,7 @@ int main(int argc, char **argv) exit(0); } vcg::tri::UpdateBounding::Box(m); - vcg::tri::UpdateNormals::PerFace(m); + vcg::tri::UpdateNormal::PerFace(m); printf("Input mesh vn:%i fn:%i\n",m.vn,m.fn); int t0=clock(); diff --git a/apps/sample/trimesh_base/trimesh_base.cpp b/apps/sample/trimesh_base/trimesh_base.cpp index ab7bbed4..46ab41f3 100644 --- a/apps/sample/trimesh_base/trimesh_base.cpp +++ b/apps/sample/trimesh_base/trimesh_base.cpp @@ -64,7 +64,7 @@ int main( int argc, char **argv ) tri::UpdateTopology::FaceFace(m); tri::UpdateFlags::FaceBorderFromFF(m); - tri::UpdateNormals::PerVertexNormalized(m); + tri::UpdateNormal::PerVertexNormalized(m); printf("Input mesh vn:%i fn:%i\n",m.VN(),m.FN()); printf( "Mesh has %i vert and %i faces\n", m.VN(), m.FN() ); diff --git a/apps/sample/trimesh_clustering/trimesh_clustering.cpp b/apps/sample/trimesh_clustering/trimesh_clustering.cpp index 8a33b117..ebff7ca4 100644 --- a/apps/sample/trimesh_clustering/trimesh_clustering.cpp +++ b/apps/sample/trimesh_clustering/trimesh_clustering.cpp @@ -1,13 +1,25 @@ - -// mesh definition -//#include -//#include -//#include - -#include -#include -#include - +/**************************************************************************** +* VCGLib o o * +* Visual and Computer Graphics Library o o * +* _ O _ * +* Copyright(C) 2004-2012 \/)\/ * +* Visual Computing Lab /\/| * +* ISTI - Italian National Research Council | * +* \ * +* All rights reserved. * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * +* for more details. * +* * +****************************************************************************/ #include #include @@ -20,10 +32,6 @@ #include #include -// std -#include -#include - using namespace vcg; using namespace std; @@ -81,7 +89,7 @@ int main(int argc, char **argv) exit(0); } vcg::tri::UpdateBounding::Box(m); - vcg::tri::UpdateNormals::PerFace(m); + vcg::tri::UpdateNormal::PerFace(m); printf("Input mesh vn:%i fn:%i\n",m.vn,m.fn); vcg::tri::Clustering > Grid; Grid.DuplicateFaceParam=DupFace; diff --git a/apps/sample/trimesh_edge/trimesh_edge.cpp b/apps/sample/trimesh_edge/trimesh_edge.cpp index cc502d2c..39a36b57 100644 --- a/apps/sample/trimesh_edge/trimesh_edge.cpp +++ b/apps/sample/trimesh_edge/trimesh_edge.cpp @@ -138,11 +138,11 @@ bool SplitMesh(MyMesh &m, /// The mesh that has to be splitted. It i { tri::Append::Mesh(A,m); tri::UpdateQuality::VertexFromPlane(A, plane); - QualityMidPointFunctor slicingfunc(0.0f); - QualityEdgePredicate slicingpred(0.0f); + tri::QualityMidPointFunctor slicingfunc(0.0f); + tri::QualityEdgePredicate slicingpred(0.0f); tri::UpdateTopology::FaceFace(A); // The Actual Slicing - RefineE, QualityEdgePredicate > (A, slicingfunc, slicingpred, false); + tri::RefineE, tri::QualityEdgePredicate > (A, slicingfunc, slicingpred, false); tri::Append::Mesh(B,A); @@ -212,7 +212,7 @@ int main( int argc, char **argv ) printf("Slice mesh has %i vert and %i faces\n", slice.vn, slice.fn ); MyMesh A,B; - bool ret=SplitMesh(m,A,B,slicingPlane); + SplitMesh(m,A,B,slicingPlane); tri::UpdatePosition::Translate(A, slicingPlane.Direction()*m.bbox.Diag()/80.0); tri::UpdatePosition::Translate(B,-slicingPlane.Direction()*m.bbox.Diag()/80.0); tri::Append::Mesh(sliced,A); diff --git a/apps/sample/trimesh_hole/trimesh_hole.cpp b/apps/sample/trimesh_hole/trimesh_hole.cpp index c9587a1c..2d693ca2 100644 --- a/apps/sample/trimesh_hole/trimesh_hole.cpp +++ b/apps/sample/trimesh_hole/trimesh_hole.cpp @@ -1,10 +1,4 @@ -#include -#include - #include -#include -#include -#include #include #include #include @@ -22,23 +16,17 @@ // half edge iterators #include - - // input output #include #include - - using namespace vcg; using namespace std; - class MyFace; class MyVertex; - struct MyUsedTypes : public UsedTypes< Use ::AsVertexType, - Use ::AsFaceType>{}; + Use ::AsFaceType>{}; class MyVertex : public Vertex< MyUsedTypes, vertex::Coord3f, vertex::BitFlags, vertex::Normal3f, vertex::Mark, vertex::Color4b >{}; class MyFace : public Face < MyUsedTypes, face::VertexRef,face::FFAdj, face::Mark, face::BitFlags, face::Normal3f> {}; @@ -110,7 +98,7 @@ int main(int argc,char ** argv){ //update the face-face topology tri::UpdateTopology::FaceFace(m); - tri::UpdateNormals::PerVertexPerFace(m); + tri::UpdateNormal::PerVertexPerFace(m); tri::UpdateFlags::FaceBorderFromFF(m); assert(tri::Clean::IsFFAdjacencyConsistent(m)); @@ -257,7 +245,7 @@ int main(int argc,char ** argv){ tri::io::ExporterPLY::Save(m,"PreSmooth.ply",false); - int UBIT = MyMesh::VertexType::LastBitFlag(); + int UBIT = MyMesh::VertexType::NewBitFlag(); f = m.face.begin(); f += indice; for(; f != m.face.end();++f) diff --git a/apps/sample/trimesh_intersection/trimesh_intersection.cpp b/apps/sample/trimesh_intersection/trimesh_intersection.cpp index 015f88bd..d500decc 100644 --- a/apps/sample/trimesh_intersection/trimesh_intersection.cpp +++ b/apps/sample/trimesh_intersection/trimesh_intersection.cpp @@ -1,34 +1,18 @@ -#include -using namespace std; - -// VCG headers for triangular mesh processing -#include -#include -#include -#include #include #include -#include #include #include #include #include #include -//#include -//#include -//#include -//#include // VCG File Format Importer/Exporter #include #include #include -// VCG Vertex - -// VCG Faces - +using namespace std; using namespace vcg; class MyFace; diff --git a/apps/sample/trimesh_optional/trimesh_optional.cpp b/apps/sample/trimesh_optional/trimesh_optional.cpp index 2532c1fa..f279a3fd 100644 --- a/apps/sample/trimesh_optional/trimesh_optional.cpp +++ b/apps/sample/trimesh_optional/trimesh_optional.cpp @@ -31,29 +31,27 @@ int main(int , char **) /// Calculates both vertex and face normals. /// The normal of a vertex v is the weigthed average of the normals of the faces incident on v. /// normals are not normalized -cmof.face.EnableFFAdjacency(); + cmof.face.EnableFFAdjacency(); - vcg::tri::UpdateTopology::FaceFace(cm); - vcg::tri::UpdateTopology::FaceFace(cmof); - - vcg::tri::UpdateFlags::FaceBorderFromFF(cm); - vcg::tri::UpdateFlags::FaceBorderFromFF(cmof); + tri::UpdateTopology::FaceFace(cm); + tri::UpdateTopology::FaceFace(cmof); - vcg::tri::UpdateNormals::PerVertexNormalized(cm); - vcg::tri::UpdateNormals::PerVertexNormalized(cmof); + tri::UpdateFlags::FaceBorderFromFF(cm); + tri::UpdateFlags::FaceBorderFromFF(cmof); + tri::UpdateNormal::PerVertexNormalized(cm); + tri::UpdateNormal::PerVertexNormalized(cmof); printf("Normal of face 0 is %f %f %f\n\n",cm.face[0].N()[0],cm.face[0].N()[1],cm.face[0].N()[2]); int t0=0,t1=0; while(t1-t0<200) { t0=clock(); - Refine(cm,MidPointButterfly(),0); + tri::Refine(cm,tri::MidPointButterfly(cm),0); t1=clock(); - Refine(cmof,MidPointButterfly(),0); + tri::Refine(cmof,tri::MidPointButterfly(cmof),0); } - cmof.vert.EnableRadius(); cmof.vert.EnableQuality(); @@ -69,7 +67,6 @@ cmof.face.EnableFFAdjacency(); { float q =vi->Q(); float r =vi->R(); -// int ii = vcg::tri::Index(cmof, *vi); assert(q==r); } } diff --git a/apps/sample/trimesh_refine/trimesh_refine.cpp b/apps/sample/trimesh_refine/trimesh_refine.cpp index b802beaa..7a7df42f 100644 --- a/apps/sample/trimesh_refine/trimesh_refine.cpp +++ b/apps/sample/trimesh_refine/trimesh_refine.cpp @@ -95,7 +95,7 @@ int main(int argc, char **argv) m.face.EnableFFAdjacency(); tri::UpdateTopology::FaceFace(m); tri::UpdateFlags::FaceBorderFromFF(m); - tri::UpdateNormals::PerVertexNormalized(m); + tri::UpdateNormal::PerVertexNormalized(m); printf("Input mesh vn:%i fn:%i\n",m.vn,m.fn); n_steps=atoi(argv[3]); @@ -105,21 +105,21 @@ int main(int argc, char **argv) switch(RefMode) { case FLAT: - Refine >(m,MidPoint(&m),length); + tri::Refine >(m,tri::MidPoint(&m),length); break; case LOOP: - tri::RefineOddEven, tri::EvenPointLoop >(m, tri::OddPointLoop(), tri::EvenPointLoop(), length); + tri::RefineOddEven, tri::EvenPointLoop >(m, tri::OddPointLoop(m), tri::EvenPointLoop(), length); break; case CATMULL: tri::BitQuadCreation::MakePureByCatmullClark(m); - tri::UpdateNormals::PerBitQuadFaceNormalized(m); + tri::UpdateNormal::PerBitQuadFaceNormalized(m); break; case ONE_QUAD_X_EDGE: tri::BitQuadCreation::MakePureByRefine(m); - tri::UpdateNormals::PerBitQuadFaceNormalized(m); + tri::UpdateNormal::PerBitQuadFaceNormalized(m); break; case BUTTERFLY: - Refine >(m,MidPointButterfly(),length); + tri::Refine >(m,tri::MidPointButterfly(m),length); break; } } diff --git a/apps/sample/trimesh_smooth/trimesh_smooth.cpp b/apps/sample/trimesh_smooth/trimesh_smooth.cpp index 57e93900..c1b0a98d 100644 --- a/apps/sample/trimesh_smooth/trimesh_smooth.cpp +++ b/apps/sample/trimesh_smooth/trimesh_smooth.cpp @@ -1,14 +1,8 @@ -#include - -#include -#include -#include #include - #include #include -// to clean up a mesh + #include #include @@ -32,24 +26,24 @@ class MyMesh : public vcg::tri::TriMesh, vector > {} int main(int argc,char ** argv) { -if(argc<4) -{ - printf("Usage: trimesh_smooth \n"); - return 0; -} + if(argc<4) + { + printf("Usage: trimesh_smooth \n"); + return 0; + } - MyMesh m; + MyMesh m; - //open a mesh - int err = tri::io::Importer::Open(m,argv[1]); + //open a mesh + int err = tri::io::Importer::Open(m,argv[1]); if(err) { // all the importers return 0 in case of success - printf("Error in reading %s: '%s'\n",argv[1], tri::io::Importer::ErrorMsg(err)); - exit(-1); - } + printf("Error in reading %s: '%s'\n",argv[1], tri::io::Importer::ErrorMsg(err)); + exit(-1); + } // some cleaning to get rid of bad file formats like stl that duplicate vertexes.. int dup = tri::Clean::RemoveDuplicateVertex(m); - int unref = tri::Clean::RemoveUnreferencedVertex(m); + int unref = tri::Clean::RemoveUnreferencedVertex(m); printf("Removed %i duplicate and %i unreferenced vertices from mesh %s\n",dup,unref,argv[1]); int Step= atoi(argv[2]); @@ -57,8 +51,8 @@ if(argc<4) for(int i=0;i::PerFaceNormalized(m); - tri::Smooth::VertexCoordPasoDobleFast(m,atoi(argv[3]),atof(argv[4]),atoi(argv[5])); + tri::UpdateNormal::PerFaceNormalized(m); + tri::Smooth::VertexCoordPasoDobleFast(m,atoi(argv[3]),atof(argv[4]),atoi(argv[5])); } //LaplacianSmooth(m,atoi(argv[2])); diff --git a/apps/sample/trimesh_topology/trimesh_topology.cpp b/apps/sample/trimesh_topology/trimesh_topology.cpp index cf08f1d6..d72116aa 100644 --- a/apps/sample/trimesh_topology/trimesh_topology.cpp +++ b/apps/sample/trimesh_topology/trimesh_topology.cpp @@ -1,86 +1,98 @@ -#include +/**************************************************************************** +* VCGLib o o * +* Visual and Computer Graphics Library o o * +* _ O _ * +* Copyright(C) 2004-2012 \/)\/ * +* Visual Computing Lab /\/| * +* ISTI - Italian National Research Council | * +* \ * +* All rights reserved. * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +* This program is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * +* for more details. * +* * +****************************************************************************/ -#include -#include -#include #include #include -// topology computation #include -// half edge iterators #include - - using namespace vcg; class MyEdge; class MyFace; class MyVertex; -struct MyUsedTypes : public UsedTypes< Use::AsVertexType, - Use::AsFaceType>{}; +struct MyUsedTypes : public UsedTypes< Use::AsVertexType, Use::AsFaceType>{}; class MyVertex : public Vertex< MyUsedTypes, vertex::Coord3f, vertex::BitFlags >{}; class MyFace : public Face < MyUsedTypes, face::VertexRef,face::FFAdj, face::Mark, face::BitFlags > {}; class MyMesh : public tri::TriMesh< std::vector, std::vector >{}; -int main(int ,char ** ){ +int main(int ,char ** ) +{ + MyMesh m; - MyMesh m; + //generate a mesh + vcg::tri::Icosahedron(m); - //generate a mesh - vcg::tri::Icosahedron(m); - - //update the face-face topology - vcg::tri::UpdateTopology::FaceFace(m); + //update the face-face topology + vcg::tri::UpdateTopology::FaceFace(m); // Now for each face the F() members are meaningful 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! + else printf("Edge 0 of face 0 is NOT a border\n"); // always this path! vcg::face::FFDetach(m.face[0],0); // Detach the face [0] from the mesh vcg::face::FFDetach(m.face[0],1); vcg::face::FFDetach(m.face[0],2); if(face::IsBorder(m.face[0],0)) printf("Edge 0 of face 0 is a border\n"); // always this path! - else printf("Edge 0 of face 0 is NOT a border\n"); + else printf("Edge 0 of face 0 is NOT a border\n"); - m.face[0].SetD(); // deleting face [0] (i.e. marked as deleted) + tri::Allocator::DeleteFace(m,m.face[0]); + // declare an iterator on the mesh + vcg::face::Pos he, hei; - // declare an iterator on the mesh - vcg::face::Pos he, hei; - - // Now a simple search and trace of all the border of the mesh - MyMesh::FaceIterator fi; UnMarkAll(m); + + // Now a simple search and trace of all the borders of the mesh int BorderEdgeNum=0; int HoleNum=0; - for(fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD()) - { - for(int j=0;j<3;j++) - { - if ( face::IsBorder(*fi,j) && tri::IsMarked(m,&*fi)) - { - tri::Mark(m,&*fi); - hei.Set(&*fi,j,fi->V(j)); - he=hei; - do - { - BorderEdgeNum++; - he.NextB(); // next edge along a border - tri::Mark(m,he.f); - } - while (he.f!=hei.f); - HoleNum++; - } - } - } - + for(MyMesh::FaceIterator fi=m.face.begin();fi!=m.face.end();++fi) if(!(*fi).IsD()) + { + for(int j=0;j<3;j++) + { + if ( face::IsBorder(*fi,j) && tri::IsMarked(m,&*fi)) + { + tri::Mark(m,&*fi); + hei.Set(&*fi,j,fi->V(j)); + he=hei; + do + { + BorderEdgeNum++; + he.NextB(); // next edge along a border + tri::Mark(m,he.f); + } + while (he.f!=hei.f); + HoleNum++; + } + } + } + printf("Mesh has %i holes and %i border edges\n",HoleNum,BorderEdgeNum); return 0; } diff --git a/apps/sample/trimesh_topology/trimesh_topology.pro b/apps/sample/trimesh_topology/trimesh_topology.pro index fcaa1ccb..e695bcbe 100644 --- a/apps/sample/trimesh_topology/trimesh_topology.pro +++ b/apps/sample/trimesh_topology/trimesh_topology.pro @@ -8,3 +8,5 @@ INCLUDEPATH += . ../../.. CONFIG += console stl TEMPLATE = app SOURCES += trimesh_topology.cpp +# Mac specific Config required to avoid to make application bundles +CONFIG -= app_bundle