From fe16c59ced2e455c4857f935bc2e226616731008 Mon Sep 17 00:00:00 2001 From: ponchio Date: Mon, 16 Oct 2006 14:28:07 +0000 Subject: [PATCH] Added callback. --- .../trimesh_ball_pivoting/trimesh_ball_pivoting.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp b/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp index da87dccd..9d9ced36 100644 --- a/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp +++ b/apps/sample/trimesh_ball_pivoting/trimesh_ball_pivoting.cpp @@ -21,6 +21,7 @@ #include // std +#include #include #include @@ -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, vector > {}; +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();