12 #ifndef _SCL_SECURE_NO_WARNINGS
13 #define _SCL_SECURE_NO_WARNINGS
52 main(
int argc,
char **argv)
57 #pragma GCC diagnostic push
58 #pragma GCC diagnostic ignored "-Wunused-but-set-variable"
62 #pragma GCC diagnostic pop
64 std::vector< std::string > mesh_filenames;
65 std::vector< std::string > cloud_filenames;
66 std::vector< std::string > mesh_extensions = {
".off",
".obj" };
67 std::vector< std::string > cloud_extensions = {
".xyz",
".ply",
".pcd" };
69 if((argc == 1) || (argv[1] && (strncmp(
"-psn", argv[1], 4) == 0)))
73 std::cout <<
"Usage: " << std::endl
75 <<
" [mesh_filename] [cloud_filename]"
76 " [-test] [-emptytest] [-all|-polyhedron|-surfacemesh|-lcc|-openmesh|-aif|-cgalps|-pclpc]"
78 <<
"Examples:" << std::endl
79 << argv[0] <<
" casting.off" << std::endl
80 << argv[0] <<
" casting.off casting.xyz" << std::endl
81 << argv[0] <<
" casting.off -test" << std::endl
82 << argv[0] <<
" casting.off -polyhedron casting.xyz" << std::endl
83 << argv[0] <<
" casting.off -polyhedron casting.xyz -pclpc -test" << std::endl;
89 for(
int i = 1; i < argc; i++)
91 std::string argvi(argv[i]);
97 else if(argvi ==
"-emptytest")
103 else if(argvi ==
"-polyhedron")
107 else if(argvi ==
"-surfacemesh")
111 else if(argvi ==
"-lcc")
115 else if(argvi ==
"-openmesh")
119 else if(argvi ==
"-aif")
123 else if(argvi ==
"-cgalps")
127 else if(argvi ==
"-pclpc")
131 else if(argvi ==
"-all")
140 mesh_filenames.push_back(argvi);
142 cloud_filenames.push_back(argvi);
150 #if QT_VERSION >= 0x040800
153 QApplication::setAttribute(
154 Qt::AA_X11InitThreads);
164 #define PCL_VERSION_PRETTY "(no PCL)"
168 QObject::tr(
"%1 - %2 - %3 - %4 - Qt (compiled) %5 - Qt (run-time) %6 - "
169 "OSG %7 - CGAL %8 (%9.%10.%11) - PCL %12")
176 .arg(osgGetVersion())
177 .arg(CGAL_VERSION_STR)
178 .arg(CGAL_VERSION_MAJOR)
179 .arg(CGAL_VERSION_MINOR)
180 .arg(CGAL_VERSION_PATCH)
190 std::cout <<
"*** file " << __FILE__ <<
" line " << __LINE__ << std::endl;
196 std::cout <<
"*** file " << __FILE__ <<
" line " << __LINE__ << std::endl;
199 if(! mesh_filenames.empty())
232 #endif // FEVV_USE_CGAL
235 std::cout <<
"*** file " << __FILE__ <<
" line " << __LINE__ << std::endl;
238 #ifdef FEVV_USE_OPENMESH
248 #endif // FEVV_USE_OPENMESH
251 std::cout <<
"*** file " << __FILE__ <<
" line " << __LINE__ << std::endl;
264 #endif // FEVV_USE_AIF
269 if(! cloud_filenames.empty())
281 #endif // FEVV_USE_CGAL
293 #endif // FEVV_USE_PCL
297 std::cout <<
"*** file " << __FILE__ <<
" line " << __LINE__ << std::endl;
305 std::cout <<
"*** file " << __FILE__ <<
" line " << __LINE__ << std::endl;
308 int ret = app.exec();
311 std::cout <<
"*** file " << __FILE__ <<
" line " << __LINE__ << std::endl;