Added callback.

This commit is contained in:
Federico Ponchio 2006-10-16 14:28:07 +00:00
parent 570929bc45
commit fe16c59ced
1 changed files with 7 additions and 1 deletions

View File

@ -21,6 +21,7 @@
#include <wrap/io_trimesh/export_ply.h>
// std
#include <iostream>
#include <vector>
#include <time.h>
@ -35,6 +36,11 @@ class MyVertex : public VertexSimp2< MyVertex, MyEdge, MyFace, vert::Coord3f, v
class MyFace : public FaceSimp2 < MyVertex, MyEdge, MyFace, face::VertexRef, face::Normal3f, face::BitFlags > {};
class MyMesh : public vcg::tri::TriMesh< vector<MyVertex>, vector<MyFace> > {};
bool callback(int percent, const char *str) {
cout << "str: " << str << " " << percent << "%\n";
return true;
}
int main(int argc, char **argv)
{
if(argc<3)
@ -87,7 +93,7 @@ int main(int argc, char **argv)
int t1=clock();
// the main processing
pivot.buildMesh();
pivot.buildMesh(callback);
int t2=clock();