diff --git a/apps/metro/mesh_type.h b/apps/metro/mesh_type.h index 1da5b04d..fc03054a 100644 --- a/apps/metro/mesh_type.h +++ b/apps/metro/mesh_type.h @@ -44,11 +44,11 @@ just color and quality on the vertex #include // Vertex, Face, Mesh and Grid definitions. -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class MyEdge; class CFace; class CVertex : public vcg::VertexSimp2 {}; diff --git a/apps/pivoting/cmesh.h b/apps/pivoting/cmesh.h index 4671df96..c8f867db 100644 --- a/apps/pivoting/cmesh.h +++ b/apps/pivoting/cmesh.h @@ -1,8 +1,8 @@ #ifndef CLOTH_MESH_H #define CLOTH_MESH_H -#include -#include +#include +#include #include #include #include diff --git a/apps/ptx2ply/ptx2ply.cpp b/apps/ptx2ply/ptx2ply.cpp index 2af14372..e4066514 100644 --- a/apps/ptx2ply/ptx2ply.cpp +++ b/apps/ptx2ply/ptx2ply.cpp @@ -6,11 +6,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/apps/sample/aabb_binary_tree/aabb_binary_tree.cpp b/apps/sample/aabb_binary_tree/aabb_binary_tree.cpp index bae48435..d4bf5c85 100644 --- a/apps/sample/aabb_binary_tree/aabb_binary_tree.cpp +++ b/apps/sample/aabb_binary_tree/aabb_binary_tree.cpp @@ -7,9 +7,9 @@ // vcg headers //#include //#include -#include -#include -#include +#include +#include +#include #include #include diff --git a/apps/sample/edgemesh_grid/edgemesh_grid.cpp b/apps/sample/edgemesh_grid/edgemesh_grid.cpp index 49299a27..5da244a4 100644 --- a/apps/sample/edgemesh_grid/edgemesh_grid.cpp +++ b/apps/sample/edgemesh_grid/edgemesh_grid.cpp @@ -1,10 +1,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -15,7 +15,7 @@ // class MyFace; class MyEdge; -class MyVertex : public vcg::VertexSimp2 {}; +class MyVertex : public vcg::VertexSimp2 {}; class MyEdge : public vcg::EdgeSimp2 {}; class MyEdgeMesh: public vcg::edg::EdgeMesh< std::vector, std::vector > {}; diff --git a/apps/sample/trackball_SDL/trackball_sdl.cpp b/apps/sample/trackball_SDL/trackball_sdl.cpp index c6454027..70c4b36c 100644 --- a/apps/sample/trackball_SDL/trackball_sdl.cpp +++ b/apps/sample/trackball_SDL/trackball_sdl.cpp @@ -28,8 +28,8 @@ the object rather than rotate it in front of the camera. #include /*include the base definition for the vertex, face, and meshes */ -#include -#include +#include +#include #include /*include the algorihm that update bounding box and normals*/ diff --git a/apps/sample/trimesh_QT/glarea.h b/apps/sample/trimesh_QT/glarea.h index 126bff31..1f641946 100644 --- a/apps/sample/trimesh_QT/glarea.h +++ b/apps/sample/trimesh_QT/glarea.h @@ -38,8 +38,8 @@ Initial release. #include /// vcg imports -#include -#include +#include +#include #include #include #include diff --git a/apps/sample/trimesh_SDL/trimesh_sdl.cpp b/apps/sample/trimesh_SDL/trimesh_sdl.cpp index e9f64766..763b3d10 100644 --- a/apps/sample/trimesh_SDL/trimesh_sdl.cpp +++ b/apps/sample/trimesh_SDL/trimesh_sdl.cpp @@ -43,10 +43,10 @@ Initial Relase #include /*include the base definition for the vertex */ -#include +#include /*include the base definition for the face */ -#include +#include /*include the base definition for the trimesh*/ #include @@ -73,7 +73,7 @@ class CEdge; // dummy prototype never used class CFace; /* define a vertex passing the attributes you want it to have. Each attributes has its own class. -Check vcg/simplex/vertexplus/component.h to find out the existing attributes. Note: then you could +Check vcg/simplex/vertex/component.h to find out the existing attributes. Note: then you could also personalized attributes */ class CVertex : public VertexSimp2< CVertex, CEdge, CFace, vertex::Coord3f, vertex::Normal3f >{}; diff --git a/apps/sample/trimesh_attribute/trimesh_attribute.cpp b/apps/sample/trimesh_attribute/trimesh_attribute.cpp index 75b31a0e..4b36cf4f 100644 --- a/apps/sample/trimesh_attribute/trimesh_attribute.cpp +++ b/apps/sample/trimesh_attribute/trimesh_attribute.cpp @@ -1,8 +1,8 @@ -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp b/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp index 160b8a93..69b4df00 100644 --- a/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp +++ b/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp @@ -4,8 +4,8 @@ //#include //#include -#include -#include +#include +#include #include #include diff --git a/apps/sample/trimesh_base/trimesh_base.cpp b/apps/sample/trimesh_base/trimesh_base.cpp index 6d827191..5a8324a9 100644 --- a/apps/sample/trimesh_base/trimesh_base.cpp +++ b/apps/sample/trimesh_base/trimesh_base.cpp @@ -1,51 +1,52 @@ -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -class AFace; -class AVertex; -class AEdge; // dummy prototype never used -class AVertex : public vcg::VertexSimp2< AVertex, AEdge, AFace, vcg::vertex::Coord3f>{}; -class AFace : public vcg::FaceSimp2< AVertex, AEdge, AFace, vcg::face::VertexRef,vcg::face::Color4b,vcg::face::Normal3f> {}; - -class AMesh : public vcg::tri::TriMesh< std::vector, std::vector > {}; - -class CFace; -class CVertex; -class CEdge; // dummy prototype never used -class CVertex : public vcg::VertexSimp2< CVertex, CEdge, CFace, vcg::vertex::Coord3f,vcg::vertex::Normal3f>{}; -class CFace : public vcg::FaceSimp2< CVertex, CEdge, CFace, vcg::face::VertexRef, vcg::face::Normal3f> {}; - -class CMesh : public vcg::tri::TriMesh< std::vector, std::vector > {}; - -int main(int , char **) -{ - AMesh am; - CMesh cm; - vcg::tri::Tetrahedron(cm); - vcg::tri::Tetrahedron(am); - - std::cout << "Generated mesh has " << cm.vn << " vertices and " << cm.fn << " triangular faces" << std::endl; - - /// 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 - vcg::tri::UpdateNormals::PerVertexPerFace(cm); - std::cout << "[cm mesh] Normal of face 0 is [" << cm.face[0].N()[0] << "," << cm.face[0].N()[1] << "," << cm.face[0].N()[2] << "]" << std::endl; - std::cout << "[cm mesh] Normal of vertex 0 is [" << cm.vert[0].N()[0] << "," << cm.vert[0].N()[1] << "," << cm.vert[0].N()[2] << "]" << std::endl; - - /// Calculates face normals. - /// normals are not normalized - vcg::tri::UpdateNormals::PerFace(am); - std::cout << "[am mesh] Normal of face 0 is [" << cm.face[0].N()[0] << "," << cm.face[0].N()[1] << "," << cm.face[0].N()[2] << "]" << std::endl; - - return 0; -} +#include + +#include// +#include +#include// +#include +#include// +#include// + +// input output +#include +#include//just in case + +// topology computation +#include// +#include// + +// half edge iterators +//#include + +// normals and curvature +#include //class UpdateNormals +#include //class curvature + +using namespace vcg; +using namespace std; + +class MyEdge; // dummy prototype +class MyFace; +class MyVertex; + +class MyVertex : public VertexSimp2< MyVertex, MyEdge, MyFace, vertex::Coord3f, vertex::Normal3f, vertex::BitFlags >{}; +class MyFace : public FaceSimp2 < MyVertex, MyEdge, MyFace, face::FFAdj, face::VertexRef, face::BitFlags > {}; +class MyMesh : public vcg::tri::TriMesh< vector, vector > {}; + +int main( int argc, char **argv ) { +MyMesh m; +// this is the section with problems +if(vcg::tri::io::ImporterPLY::Open(m,argv[1])!=0) +{ +printf("Error reading file %s\n",argv[1]); +exit(0); +} // from here no problems + +vcg::tri::UpdateTopology::FaceFace(m); +vcg::tri::UpdateFlags::FaceBorderFromFF(m); +vcg::tri::UpdateNormals::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 ); + +return 0; +} \ No newline at end of file diff --git a/apps/sample/trimesh_base/trimesh_definition.cpp b/apps/sample/trimesh_base/trimesh_definition.cpp index f62d7d9c..c4c590ab 100644 --- a/apps/sample/trimesh_base/trimesh_definition.cpp +++ b/apps/sample/trimesh_base/trimesh_definition.cpp @@ -1,9 +1,9 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/apps/sample/trimesh_clustering/trimesh_clustering.cpp b/apps/sample/trimesh_clustering/trimesh_clustering.cpp index 417abd8a..1417f646 100644 --- a/apps/sample/trimesh_clustering/trimesh_clustering.cpp +++ b/apps/sample/trimesh_clustering/trimesh_clustering.cpp @@ -4,8 +4,8 @@ //#include //#include -#include -#include +#include +#include #include #include diff --git a/apps/sample/trimesh_hole/trimesh_hole.cpp b/apps/sample/trimesh_hole/trimesh_hole.cpp index 97d25400..fe509fdd 100644 --- a/apps/sample/trimesh_hole/trimesh_hole.cpp +++ b/apps/sample/trimesh_hole/trimesh_hole.cpp @@ -1,8 +1,8 @@ #include #include -#include -#include +#include +#include #include #include #include diff --git a/apps/sample/trimesh_intersection/trimesh_intersection.cpp b/apps/sample/trimesh_intersection/trimesh_intersection.cpp index d41c34dd..ff3c4c6f 100644 --- a/apps/sample/trimesh_intersection/trimesh_intersection.cpp +++ b/apps/sample/trimesh_intersection/trimesh_intersection.cpp @@ -3,10 +3,10 @@ using namespace std; // VCG headers for triangular mesh processing -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include diff --git a/apps/sample/trimesh_isosurface/trimesh_isosurface.cpp b/apps/sample/trimesh_isosurface/trimesh_isosurface.cpp index 24c68887..d7df54ee 100644 --- a/apps/sample/trimesh_isosurface/trimesh_isosurface.cpp +++ b/apps/sample/trimesh_isosurface/trimesh_isosurface.cpp @@ -3,8 +3,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/apps/sample/trimesh_join/trimesh_join.cpp b/apps/sample/trimesh_join/trimesh_join.cpp index e61c4c0b..3b6d118a 100644 --- a/apps/sample/trimesh_join/trimesh_join.cpp +++ b/apps/sample/trimesh_join/trimesh_join.cpp @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include #include #include diff --git a/apps/sample/trimesh_optional/trimesh_optional.cpp b/apps/sample/trimesh_optional/trimesh_optional.cpp index 55874587..bb6ce707 100644 --- a/apps/sample/trimesh_optional/trimesh_optional.cpp +++ b/apps/sample/trimesh_optional/trimesh_optional.cpp @@ -1,15 +1,15 @@ #include #include -#include -#include +#include +#include #include -#include -#include +#include +#include -#include -#include +#include +#include #include #include diff --git a/apps/sample/trimesh_optional/trimesh_optional_occ.cpp b/apps/sample/trimesh_optional/trimesh_optional_occ.cpp index 6b0c642d..9272aec8 100644 --- a/apps/sample/trimesh_optional/trimesh_optional_occ.cpp +++ b/apps/sample/trimesh_optional/trimesh_optional_occ.cpp @@ -1,8 +1,8 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/apps/sample/trimesh_optional/trimesh_optional_ocf.cpp b/apps/sample/trimesh_optional/trimesh_optional_ocf.cpp index 5829c0d6..b110d879 100644 --- a/apps/sample/trimesh_optional/trimesh_optional_ocf.cpp +++ b/apps/sample/trimesh_optional/trimesh_optional_ocf.cpp @@ -1,8 +1,8 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include diff --git a/apps/sample/trimesh_optional/trimesh_simpdata_simp.cpp b/apps/sample/trimesh_optional/trimesh_simpdata_simp.cpp index 635d85e4..91142292 100644 --- a/apps/sample/trimesh_optional/trimesh_simpdata_simp.cpp +++ b/apps/sample/trimesh_optional/trimesh_simpdata_simp.cpp @@ -1,9 +1,9 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/apps/sample/trimesh_pos_demo/mesh_type.h b/apps/sample/trimesh_pos_demo/mesh_type.h index 34ce8711..10be99d7 100644 --- a/apps/sample/trimesh_pos_demo/mesh_type.h +++ b/apps/sample/trimesh_pos_demo/mesh_type.h @@ -30,9 +30,9 @@ first draft. Working but ugly interface. right mouse of the button to place a p */ #pragma once /** the definition of vertex */ -#include +#include /** the definition of face */ -#include +#include /** definition of triangle mesh */ #include diff --git a/apps/sample/trimesh_pos_demo/trimesh_pos_demo.cpp b/apps/sample/trimesh_pos_demo/trimesh_pos_demo.cpp index e00e35f7..6c41cb96 100644 --- a/apps/sample/trimesh_pos_demo/trimesh_pos_demo.cpp +++ b/apps/sample/trimesh_pos_demo/trimesh_pos_demo.cpp @@ -1,9 +1,9 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/apps/sample/trimesh_pos_demo/trimesh_vfiter_demo.cpp b/apps/sample/trimesh_pos_demo/trimesh_vfiter_demo.cpp index 2a7e03ab..98653400 100644 --- a/apps/sample/trimesh_pos_demo/trimesh_vfiter_demo.cpp +++ b/apps/sample/trimesh_pos_demo/trimesh_vfiter_demo.cpp @@ -1,9 +1,9 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/apps/sample/trimesh_refine/trimesh_refine.cpp b/apps/sample/trimesh_refine/trimesh_refine.cpp index 3492a877..d404cc07 100644 --- a/apps/sample/trimesh_refine/trimesh_refine.cpp +++ b/apps/sample/trimesh_refine/trimesh_refine.cpp @@ -4,8 +4,8 @@ //#include //#include -#include -#include +#include +#include #include #include diff --git a/apps/sample/trimesh_smooth/trimesh_smooth.cpp b/apps/sample/trimesh_smooth/trimesh_smooth.cpp index 12756071..c3c2ed5d 100644 --- a/apps/sample/trimesh_smooth/trimesh_smooth.cpp +++ b/apps/sample/trimesh_smooth/trimesh_smooth.cpp @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include #include #include diff --git a/apps/sample/trimesh_topology/trimesh_topology.cpp b/apps/sample/trimesh_topology/trimesh_topology.cpp index cf13acac..550981e5 100644 --- a/apps/sample/trimesh_topology/trimesh_topology.cpp +++ b/apps/sample/trimesh_topology/trimesh_topology.cpp @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include #include #include #include diff --git a/apps/tridecimator/tridecimator.cpp b/apps/tridecimator/tridecimator.cpp index 4f8366d1..34734ba8 100644 --- a/apps/tridecimator/tridecimator.cpp +++ b/apps/tridecimator/tridecimator.cpp @@ -7,8 +7,8 @@ using namespace std; // stuff to define the mesh -#include -#include +#include +#include #include #include diff --git a/apps/trimeshinfo/trimeshinfo.cpp b/apps/trimeshinfo/trimeshinfo.cpp index 43073642..7ac9868e 100644 --- a/apps/trimeshinfo/trimeshinfo.cpp +++ b/apps/trimeshinfo/trimeshinfo.cpp @@ -182,11 +182,11 @@ Added Standard comments using namespace std; // VCG headers -#include -#include +#include +#include -#include -#include +#include +#include #include #include