From 38dcf9bc0061d8aa13cbeea3a48f99b61bb8e2d7 Mon Sep 17 00:00:00 2001 From: ganovelli Date: Fri, 30 Apr 2010 09:42:52 +0000 Subject: [PATCH] updated to changes in clean.h --- apps/sample/polygonmesh_base/polygonmesh.cpp | 29 ++++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/apps/sample/polygonmesh_base/polygonmesh.cpp b/apps/sample/polygonmesh_base/polygonmesh.cpp index c3b62859..458134e9 100644 --- a/apps/sample/polygonmesh_base/polygonmesh.cpp +++ b/apps/sample/polygonmesh_base/polygonmesh.cpp @@ -66,7 +66,7 @@ using namespace std; class CFace; class CVertex; class CHEdge; -class DummyEdge; +class CEdge; class MyPolyVertex; struct CUsedTypes: public vcg::UsedTypes< vcg::Use::AsVertexType, vcg::Use::AsFaceType >{}; @@ -97,11 +97,12 @@ class CMesh : public vcg::tri::TriMesh< vector, vector > {}; class MyPolyFace; class MyPolyVertex; struct PolyUsedTypes: public vcg::UsedTypes ::AsVertexType, - vcg::Use ::AsHEdgeType, - vcg::Use ::AsFaceType - >{}; - + vcg::Use ::AsEdgeType, + vcg::Use ::AsHEdgeType, + vcg::Use ::AsFaceType + >{}; +//class DummyEdge: public vcg::Edge{}; class MyPolyVertex:public vcg::Vertex< PolyUsedTypes, vcg::vertex::Coord3f, vcg::vertex::Normal3f, @@ -109,6 +110,7 @@ class MyPolyVertex:public vcg::Vertex< PolyUsedTypes, vcg::vertex::BitFlags, vcg::vertex::VHAdj>{} ; +class CEdge : public Edge{}; class CHEdge : public HEdge< PolyUsedTypes, hedge::BitFlags, //hedge::HFAdj, // pointer to the face //hedge::HOppAdj, // pointer to the opposite edge @@ -132,9 +134,11 @@ class MyPolyFace:public vcg::Face< > {}; class MyPolyMesh: public - vcg::tri::TriMesh< std::vector, // the vector of vertices - std::vector, // the vector of faces - std::vector // the vector of edges + vcg::tri::TriMesh< + std::vector, // the vector of vertices + std::vector, // the vector of faces + std::vector , // the vector of edges + std::vector // the vector of edges >{}; MyPolyMesh pm; @@ -144,7 +148,7 @@ MyPolyMesh pm; // Globals: the mesh, the OpenGL wrapper to draw the mesh and the trackball. CMesh mesh,mesh1; -int main(int argc, char *argv[]) { +int main(int argc, char *argv[]) { int loadmask; @@ -166,8 +170,9 @@ if(false){ vcg::tri::UpdateTopology::FaceFace(mesh); vcg::tri::Clean::RemoveNonManifoldFace(mesh); vcg::tri::UpdateTopology::FaceFace(mesh); - assert(vcg::tri::Clean::IsTwoManifoldFace(mesh)); - + assert(vcg::tri::Clean::CountNonManifoldEdgeFF(mesh)==0); + assert(vcg::tri::Clean::CountNonManifoldVertexFF(mesh)==0); + // create a polygon meshe from a trimesh with tagged faces vcg::tri::PolygonSupport::ImportFromTriMesh(pm,mesh); } @@ -180,7 +185,7 @@ else vcg::tri::UpdateTopology::FaceFace(pm); vcg::tri::Clean::RemoveNonManifoldFace(pm); vcg::tri::UpdateTopology::FaceFace(pm); - assert(vcg::tri::Clean::IsTwoManifoldFace(pm)); + assert(vcg::tri::Clean::CountNonManifoldEdgeFF(pm)); }