mirror of https://github.com/CGAL/cgal
Use EXIT_SUCCESS/FAILURE
This commit is contained in:
parent
c68cf8fc4c
commit
6613c29bde
|
|
@ -27,12 +27,12 @@ typedef boost::graph_traits<SurfaceMesh>::face_descriptor face_descriptor;
|
|||
|
||||
namespace SMP = CGAL::Surface_mesh_parameterization;
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ifstream in((argc>1) ? argv[1] : "data/three_peaks.off");
|
||||
if(!in) {
|
||||
std::cerr << "Problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
SurfaceMesh sm;
|
||||
|
|
@ -52,11 +52,11 @@ int main(int argc, char * argv[])
|
|||
|
||||
if(err != SMP::OK) {
|
||||
std::cerr << "Error: " << SMP::get_error_message(err) << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
std::ofstream out("result.off");
|
||||
SMP::IO::output_uvmap_to_off(sm, bhd, uv_map, out);
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ typedef boost::graph_traits<Mesh>::face_descriptor face_descriptor;
|
|||
|
||||
namespace SMP = CGAL::Surface_mesh_parameterization;
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ifstream in_mesh((argc>1) ? argv[1] : "data/lion.off");
|
||||
if(!in_mesh){
|
||||
std::cerr << "Error: problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
SurfaceMesh sm;
|
||||
|
|
@ -97,6 +97,6 @@ int main(int argc, char * argv[])
|
|||
std::ofstream out("result.off");
|
||||
SMP::IO::output_uvmap_to_off(mesh, bhd, uv_pm, out);
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ typedef SurfaceMesh::Property_map<SM_halfedge_descriptor, Point_2> UV_pmap;
|
|||
|
||||
namespace SMP = CGAL::Surface_mesh_parameterization;
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
CGAL::Timer task_timer;
|
||||
task_timer.start();
|
||||
|
|
@ -50,7 +50,7 @@ int main(int argc, char * argv[])
|
|||
std::ifstream in_mesh(mesh_filename);
|
||||
if(!in_mesh) {
|
||||
std::cerr << "Error: problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
SurfaceMesh sm; // underlying mesh of the seam mesh
|
||||
|
|
@ -120,4 +120,5 @@ int main(int argc, char * argv[])
|
|||
parameterizer.parameterize(mesh, bhd, cmap, uvmap, vimap);
|
||||
|
||||
std::cout << "Finished in " << task_timer.time() << " seconds" << std::endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,12 +37,12 @@ typedef boost::graph_traits<Mesh>::face_descriptor face_descriptor;
|
|||
|
||||
namespace SMP = CGAL::Surface_mesh_parameterization;
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ifstream in_mesh((argc>1)?argv[1]:"data/lion.off");
|
||||
if(!in_mesh) {
|
||||
std::cerr << "Error: problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
PolyMesh sm;
|
||||
|
|
@ -77,6 +77,6 @@ int main(int argc, char * argv[])
|
|||
std::ofstream out("result.off");
|
||||
SMP::IO::output_uvmap_to_off(mesh, bhd, uv_pm, out);
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,12 +21,12 @@ typedef boost::graph_traits<SurfaceMesh>::face_descriptor face_descriptor;
|
|||
|
||||
namespace SMP = CGAL::Surface_mesh_parameterization;
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ifstream in((argc>1) ? argv[1] : "data/nefertiti.off");
|
||||
if(!in) {
|
||||
std::cerr << "Problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
SurfaceMesh sm;
|
||||
|
|
@ -44,5 +44,5 @@ int main(int argc, char * argv[])
|
|||
std::ofstream out("result.off");
|
||||
SMP::IO::output_uvmap_to_off(sm, bhd, uv_map, out);
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ bool read_vertices(const PolyMesh& mesh,
|
|||
return true;
|
||||
}
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
std::ifstream in((argc>1) ? argv[1] : "data/nefertiti.off");
|
||||
if(!in){
|
||||
|
|
@ -118,7 +118,7 @@ int main(int argc, char * argv[])
|
|||
Vd_array vda;
|
||||
if(!read_vertices(sm, filename, vda)) {
|
||||
std::cerr << "Error: problem loading the square corners" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
typedef SMP::Square_border_uniform_parameterizer_3<PolyMesh> Border_parameterizer;
|
||||
|
|
@ -138,5 +138,5 @@ int main(int argc, char * argv[])
|
|||
std::ofstream out("result.off");
|
||||
SMP::IO::output_uvmap_to_off(sm, bhd, uv_map, out);
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ int main(int, char**)
|
|||
in >> pm;
|
||||
if(!in || num_vertices(pm) == 0) {
|
||||
std::cerr << "Problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
PM_halfedge_descriptor hd = CGAL::Polygon_mesh_processing::longest_border(pm).first;
|
||||
|
|
@ -108,7 +108,7 @@ int main(int, char**)
|
|||
|
||||
if(status != SMP::OK) {
|
||||
std::cout << "Encountered a problem: " << status << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
else {
|
||||
std::cout << "Parameterized with MVC (POLY)!" << std::endl;
|
||||
|
|
@ -129,7 +129,7 @@ int main(int, char**)
|
|||
in >> pm;
|
||||
if(!in || num_vertices(pm) == 0) {
|
||||
std::cerr << "Problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
PM_halfedge_descriptor hd = CGAL::Polygon_mesh_processing::longest_border(pm).first;
|
||||
|
|
@ -162,7 +162,7 @@ int main(int, char**)
|
|||
|
||||
if(status != SMP::OK) {
|
||||
std::cout << "Encountered a problem: " << status << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
else {
|
||||
std::cout << "Parameterized with ARAP (POLY)!" << std::endl;
|
||||
|
|
@ -183,7 +183,7 @@ int main(int, char**)
|
|||
in >> sm;
|
||||
if(!in || num_vertices(sm) == 0) {
|
||||
std::cerr << "Problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
SM_halfedge_descriptor hd = CGAL::Polygon_mesh_processing::longest_border(sm).first;
|
||||
|
|
@ -214,7 +214,7 @@ int main(int, char**)
|
|||
|
||||
if(status != SMP::OK) {
|
||||
std::cout << "Encountered a problem: " << status << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
else {
|
||||
std::cout << "Parameterized with Barycentric (SM)!" << std::endl;
|
||||
|
|
@ -235,7 +235,7 @@ int main(int, char**)
|
|||
in >> sm;
|
||||
if(!in || num_vertices(sm) == 0) {
|
||||
std::cerr << "Problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// halfedge on the longest border
|
||||
|
|
@ -269,7 +269,7 @@ int main(int, char**)
|
|||
SMP::Error_code status = parameterizer.parameterize(sm, hd, uv_pm, vipm, vpm);
|
||||
if(status != SMP::OK) {
|
||||
std::cout << "Encountered a problem: " << status << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
else {
|
||||
std::cout << "Parameterized with ARAP (SM)!" << std::endl;
|
||||
|
|
@ -286,7 +286,7 @@ int main(int, char**)
|
|||
in >> pm;
|
||||
if(!in || num_vertices(pm) == 0) {
|
||||
std::cerr << "Problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
const char* selection = "data/fandisk.dcm.selection.txt";
|
||||
|
||||
|
|
@ -330,7 +330,7 @@ int main(int, char**)
|
|||
|
||||
if(status != SMP::OK) {
|
||||
std::cout << "Encountered a problem: " << status << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
else {
|
||||
std::cout << "Parameterized with DCM (SEAM POLY)!" << std::endl;
|
||||
|
|
@ -351,7 +351,7 @@ int main(int, char**)
|
|||
in >> sm;
|
||||
if(!in || num_vertices(sm) == 0) {
|
||||
std::cerr << "Problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
const char* selection = "data/bear.dac.selection.txt";
|
||||
|
|
@ -395,7 +395,7 @@ int main(int, char**)
|
|||
SMP::Error_code status = parameterizer.parameterize(mesh, hd, uv_pm, vipm, vpm);
|
||||
if(status != SMP::OK) {
|
||||
std::cout << "Encountered a problem: " << status << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
else {
|
||||
std::cout << "Parameterized with DAC (SEAM SM)!" << std::endl;
|
||||
|
|
@ -413,7 +413,7 @@ int main(int, char**)
|
|||
in >> sm;
|
||||
if(!in || num_vertices(sm) == 0) {
|
||||
std::cerr << "Problem loading the input data" << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
const char* cone_filename = "data/fandisk.orbifold.selection.txt";
|
||||
|
|
@ -471,7 +471,7 @@ int main(int, char**)
|
|||
SMP::Error_code status = parameterizer.parameterize(mesh, hd, cmap, uvmap, vimap);
|
||||
if(status != SMP::OK) {
|
||||
std::cout << "Encountered a problem: " << status << std::endl;
|
||||
return 1;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
else {
|
||||
std::cout << "Parameterized with Orbifold (SEAM SM)!" << std::endl;
|
||||
|
|
@ -481,5 +481,5 @@ int main(int, char**)
|
|||
|
||||
std::cout << "Done!" << std::endl;
|
||||
|
||||
return 0;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue