updated to changes in clean.h

This commit is contained in:
ganovelli 2010-04-30 09:42:52 +00:00
parent 77a846fe90
commit 38dcf9bc00
1 changed files with 17 additions and 12 deletions

View File

@ -66,7 +66,7 @@ using namespace std;
class CFace; class CFace;
class CVertex; class CVertex;
class CHEdge; class CHEdge;
class DummyEdge; class CEdge;
class MyPolyVertex; class MyPolyVertex;
struct CUsedTypes: public vcg::UsedTypes< vcg::Use<CVertex>::AsVertexType, vcg::Use<CFace>::AsFaceType >{}; struct CUsedTypes: public vcg::UsedTypes< vcg::Use<CVertex>::AsVertexType, vcg::Use<CFace>::AsFaceType >{};
@ -97,11 +97,12 @@ class CMesh : public vcg::tri::TriMesh< vector<CVertex>, vector<CFace> > {};
class MyPolyFace; class MyPolyFace;
class MyPolyVertex; class MyPolyVertex;
struct PolyUsedTypes: public vcg::UsedTypes<vcg::Use<MyPolyVertex> ::AsVertexType, struct PolyUsedTypes: public vcg::UsedTypes<vcg::Use<MyPolyVertex> ::AsVertexType,
vcg::Use<CEdge> ::AsEdgeType,
vcg::Use<CHEdge> ::AsHEdgeType, vcg::Use<CHEdge> ::AsHEdgeType,
vcg::Use<MyPolyFace> ::AsFaceType vcg::Use<MyPolyFace> ::AsFaceType
>{}; >{};
//class DummyEdge: public vcg::Edge<PolyUsedTypes>{};
class MyPolyVertex:public vcg::Vertex< PolyUsedTypes, class MyPolyVertex:public vcg::Vertex< PolyUsedTypes,
vcg::vertex::Coord3f, vcg::vertex::Coord3f,
vcg::vertex::Normal3f, vcg::vertex::Normal3f,
@ -109,6 +110,7 @@ class MyPolyVertex:public vcg::Vertex< PolyUsedTypes,
vcg::vertex::BitFlags, vcg::vertex::BitFlags,
vcg::vertex::VHAdj>{} ; vcg::vertex::VHAdj>{} ;
class CEdge : public Edge<PolyUsedTypes>{};
class CHEdge : public HEdge< PolyUsedTypes, hedge::BitFlags, class CHEdge : public HEdge< PolyUsedTypes, hedge::BitFlags,
//hedge::HFAdj, // pointer to the face //hedge::HFAdj, // pointer to the face
//hedge::HOppAdj, // pointer to the opposite edge //hedge::HOppAdj, // pointer to the opposite edge
@ -132,9 +134,11 @@ class MyPolyFace:public vcg::Face<
> {}; > {};
class MyPolyMesh: public class MyPolyMesh: public
vcg::tri::TriMesh< std::vector<MyPolyVertex>, // the vector of vertices vcg::tri::TriMesh<
std::vector<MyPolyVertex>, // the vector of vertices
std::vector<MyPolyFace >, // the vector of faces std::vector<MyPolyFace >, // the vector of faces
std::vector<CHEdge> // the vector of edges std::vector<CHEdge> , // the vector of edges
std::vector<CEdge> // the vector of edges
>{}; >{};
MyPolyMesh pm; MyPolyMesh pm;
@ -166,7 +170,8 @@ if(false){
vcg::tri::UpdateTopology<CMesh>::FaceFace(mesh); vcg::tri::UpdateTopology<CMesh>::FaceFace(mesh);
vcg::tri::Clean<CMesh>::RemoveNonManifoldFace(mesh); vcg::tri::Clean<CMesh>::RemoveNonManifoldFace(mesh);
vcg::tri::UpdateTopology<CMesh>::FaceFace(mesh); vcg::tri::UpdateTopology<CMesh>::FaceFace(mesh);
assert(vcg::tri::Clean<CMesh>::IsTwoManifoldFace(mesh)); assert(vcg::tri::Clean<CMesh>::CountNonManifoldEdgeFF(mesh)==0);
assert(vcg::tri::Clean<CMesh>::CountNonManifoldVertexFF(mesh)==0);
// create a polygon meshe from a trimesh with tagged faces // create a polygon meshe from a trimesh with tagged faces
vcg::tri::PolygonSupport<CMesh,MyPolyMesh>::ImportFromTriMesh(pm,mesh); vcg::tri::PolygonSupport<CMesh,MyPolyMesh>::ImportFromTriMesh(pm,mesh);
@ -180,7 +185,7 @@ else
vcg::tri::UpdateTopology<MyPolyMesh>::FaceFace(pm); vcg::tri::UpdateTopology<MyPolyMesh>::FaceFace(pm);
vcg::tri::Clean<MyPolyMesh>::RemoveNonManifoldFace(pm); vcg::tri::Clean<MyPolyMesh>::RemoveNonManifoldFace(pm);
vcg::tri::UpdateTopology<MyPolyMesh>::FaceFace(pm); vcg::tri::UpdateTopology<MyPolyMesh>::FaceFace(pm);
assert(vcg::tri::Clean<MyPolyMesh>::IsTwoManifoldFace(pm)); assert(vcg::tri::Clean<MyPolyMesh>::CountNonManifoldEdgeFF(pm));
} }