MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / main

Function main

simulation/tools/sim_test_performance.cpp:366–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364}
365
366int
367main(int argc, char** argv)
368{
369 int width = 640;
370 int height = 480;
371
372 window_width_ = width * 2;
373 window_height_ = height * 2;
374
375 int cols = 30;
376 int rows = 30;
377 int col_width = 20;
378 int row_height = 15;
379
380 print_info("Range likelihood performance tests using pcl::simulation. For more "
381 "information, use: %s -h\n",
382 argv[0]);
383
384 if (argc < 2) {
385 printHelp(argc, argv);
386 return (-1);
387 }
388
389 for (int i = 0; i < 2048; ++i) {
390 float v = static_cast<float>(i / 2048.0);
391 v = powf(v, 3) * 6;
392 t_gamma[i] = static_cast<std::uint16_t>(v * 6 * 256);
393 }
394
395 glutInit(&argc, argv);
396 glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGB);
397 glutInitWindowPosition(10, 10);
398 glutInitWindowSize(window_width_, window_height_);
399 glutCreateWindow("OpenGL range likelihood");
400
401 GLenum err = glewInit();
402 if (GLEW_OK != err) {
403 std::cerr << "Error: " << glewGetErrorString(err) << std::endl;
404 exit(-1);
405 }
406
407 std::cout << "Status: Using GLEW " << glewGetString(GLEW_VERSION) << std::endl;
408
409 if (glewIsSupported("GL_VERSION_2_0"))
410 std::cout << "OpenGL 2.0 supported" << std::endl;
411 else {
412 std::cerr << "Error: OpenGL 2.0 not supported" << std::endl;
413 exit(1);
414 }
415
416 std::cout << "GL_MAX_VIEWPORTS: " << GL_MAX_VIEWPORTS << std::endl;
417
418 camera_ = Camera::Ptr(new Camera());
419 scene_ = Scene::Ptr(new Scene());
420
421 range_likelihood_visualization_ =
422 RangeLikelihood::Ptr(new RangeLikelihood(1, 1, height, width, scene_));
423 range_likelihood_ = RangeLikelihood::Ptr(

Callers

nothing calls this directly

Calls 4

printHelpFunction · 0.70
initializeFunction · 0.70
getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected