87int main(
int argc,
char* argv[] )
89 int precision = argc > 1 ? atoi( argv[ 1 ] ) : 100;
90 std::string inputFilename = argc > 2
91 ? std::string( argv[ 2 ] )
92 : examplesPath +
"samples/bunny.dat" ;
93 std::vector< RealPoint > points;
94 std::ifstream finput( inputFilename.c_str() );
96 while ( std::getline( finput, linestr ) )
98 std::istringstream iss( linestr );
100 if ( ! (iss >> a >> b >> c) )
break;
101 points.push_back(
RealPoint( a, b, c ) );
103 trace.
info() <<
"Read " << points.size() <<
" 3D points." << std::endl;
108 = Helper::computeRationalPolytope( points, precision );
113 bool ok = Helper::computeConvexHullBoundary( mesh, points, precision );
115 std::ofstream out(
"qhull-mesh.obj" );
121 bool ok2 = Helper::computeConvexHullBoundary( polysurf, points, precision );
126 bool ok3 = Helper::computeConvexHullCellComplex( cvx_complex, points, precision );
127 trace.
info() << cvx_complex << std::endl;
129 return ( ok && ok2 && ok3 ) ? 0 : 1;