37 #include <visp3/core/vpConfig.h> 38 #include <visp3/core/vpRect.h> 42 vpRect c(10.1, 15.05, 19.63, 7.84);
43 vpRect a(c.getLeft() - 12.456, c.getTop() - 7.75, c.getWidth() + 12.456, c.getHeight() + 7.75);
44 vpRect b(c.getLeft(), c.getTop(), c.getWidth() + 8.81, c.getHeight() + 14.57);
48 std::cout <<
"Test intersection." << std::endl;
49 std::cout <<
"a=" << a << std::endl;
50 std::cout <<
"b=" << b << std::endl;
51 std::cout <<
"c=" << c << std::endl;
52 std::cout <<
"intersect=" << intersect << std::endl;
55 std::cerr <<
"Problem with the intersection function!" << std::endl;
60 std::cout <<
"a=" << a << std::endl;
63 std::cerr <<
"Problem with the intersection function!" << std::endl;
67 a =
vpRect(11.45, 15.67, 3.5, 7.81);
68 b =
vpRect(24.78, 31.46, 7.48, 11.28);
71 std::cout <<
"\nTest no intersection." << std::endl;
72 std::cout <<
"a=" << a << std::endl;
73 std::cout <<
"b=" << b << std::endl;
74 std::cout <<
"intersect=" << intersect << std::endl;
76 if (intersect !=
vpRect()) {
77 std::cerr <<
"Problem with the intersection function!" << std::endl;
82 std::cout <<
"a=" << a << std::endl;
85 std::cerr <<
"Problem with the intersection function!" << std::endl;
89 std::cout <<
"vpRect is ok." << std::endl;
Defines a rectangle in the plane.