22 cout <<
"Menu: " << menuID << endl <<
" x=" <<
x <<
" y=" <<
y << endl;
32 win.enableMousePanZoom(
true);
33 win.addPopupMenuEntry(
"Mark this point...", 1);
38 for (
double x = 0;
x < 5;
x += 0.01f)
45 win.plot(X, Y,
"r-3");
46 win.axis_equal(
false);
53 win2.enableMousePanZoom(
true);
59 ellipse_cov(0, 0) = 1.0f;
60 ellipse_cov(1, 1) = 1.0f;
61 ellipse_cov(0, 1) = ellipse_cov(1, 0) = 0.5f;
63 win2.plotEllipse(1.0f, 2.0f, ellipse_cov, 3,
"k-2");
64 win2.plotEllipse(mean_x, mean_y, ellipse_cov, 3,
"b-2",
"my_ellipse");
66 win2.axis(-10, 10, -10, 10);
67 win2.axis_equal(
true);
71 cout <<
"Press any key to exit..." << endl;
75 ellipse_cov(0, 1) = ellipse_cov(1, 0) = -0.9f;
77 !
win.keyHit() && !win2.keyHit())
82 win2.plotEllipse(mean_x, mean_y, ellipse_cov, 3,
"b-2",
"my_ellipse");
84 std::this_thread::sleep_for(50ms);
98 catch (std::exception& e)
100 std::cout <<
"MRPT exception caught: " << e.what() << std::endl;
105 printf(
"Untyped exception!!");