minimal formatting changes
This commit is contained in:
parent
0f6cfeb1c0
commit
572170bfdd
|
@ -40,7 +40,7 @@
|
|||
#include<vcg/complex/trimesh/update/topology.h>
|
||||
|
||||
// normals
|
||||
#include<vcg/complex/trimesh/update/normal.h> //class UpdateNormals
|
||||
#include<vcg/complex/trimesh/update/normal.h>
|
||||
|
||||
using namespace vcg;
|
||||
using namespace std;
|
||||
|
@ -48,36 +48,36 @@ using namespace std;
|
|||
class MyEdge;
|
||||
class MyFace;
|
||||
class MyVertex;
|
||||
struct MyUsedTypes : public UsedTypes< Use<MyVertex> ::AsVertexType,
|
||||
Use<MyEdge> ::AsEdgeType,
|
||||
Use<MyFace> ::AsFaceType>{};
|
||||
struct MyUsedTypes : public UsedTypes< Use<MyVertex> ::AsVertexType,
|
||||
Use<MyEdge> ::AsEdgeType,
|
||||
Use<MyFace> ::AsFaceType>{};
|
||||
|
||||
class MyVertex : public Vertex<MyUsedTypes, vertex::Coord3f, vertex::Normal3f, vertex::BitFlags >{};
|
||||
class MyFace : public Face< MyUsedTypes, face::FFAdj, face::VertexRef, face::BitFlags > {};
|
||||
class MyEdge : public Edge<MyUsedTypes>{};
|
||||
class MyMesh : public vcg::tri::TriMesh< vector<MyVertex>, vector<MyFace> , vector<MyEdge> > {};
|
||||
class MyEdge : public Edge<MyUsedTypes>{};
|
||||
class MyMesh : public tri::TriMesh< vector<MyVertex>, vector<MyFace> , vector<MyEdge> > {};
|
||||
|
||||
int main( int argc, char **argv )
|
||||
{
|
||||
if(argc<2)
|
||||
{
|
||||
printf("Usage trimesh_base <meshfilename.ply>\n");
|
||||
return -1;
|
||||
}
|
||||
if(argc<2)
|
||||
{
|
||||
printf("Usage trimesh_base <meshfilename.ply>\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
MyMesh m;
|
||||
MyMesh m;
|
||||
|
||||
if(vcg::tri::io::ImporterPLY<MyMesh>::Open(m,argv[1])!=0)
|
||||
{
|
||||
printf("Error reading file %s\n",argv[1]);
|
||||
exit(0);
|
||||
}
|
||||
if(tri::io::ImporterPLY<MyMesh>::Open(m,argv[1])!=0)
|
||||
{
|
||||
printf("Error reading file %s\n",argv[1]);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
vcg::tri::UpdateTopology<MyMesh>::FaceFace(m);
|
||||
vcg::tri::UpdateFlags<MyMesh>::FaceBorderFromFF(m);
|
||||
vcg::tri::UpdateNormals<MyMesh>::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 );
|
||||
tri::UpdateTopology<MyMesh>::FaceFace(m);
|
||||
tri::UpdateFlags<MyMesh>::FaceBorderFromFF(m);
|
||||
tri::UpdateNormals<MyMesh>::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;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue