36 #include <visp3/core/vpConfig.h>
37 #include <visp3/core/vpRect.h>
40 vpRect c(10.1, 15.05, 19.63, 7.84);
41 vpRect a(c.getLeft() - 12.456, c.getTop() - 7.75, c.getWidth() + 12.456, c.getHeight() + 7.75);
42 vpRect b(c.getLeft(), c.getTop(), c.getWidth() + 8.81, c.getHeight() + 14.57);
46 std::cout <<
"Test intersection." << std::endl;
47 std::cout <<
"a=" << a << std::endl;
48 std::cout <<
"b=" << b << std::endl;
49 std::cout <<
"c=" << c << std::endl;
50 std::cout <<
"intersect=" << intersect << std::endl;
53 std::cerr <<
"Problem with the intersection function!" << std::endl;
58 std::cout <<
"a=" << a << std::endl;
61 std::cerr <<
"Problem with the intersection function!" << std::endl;
65 a =
vpRect(11.45, 15.67, 3.5, 7.81);
66 b =
vpRect(24.78, 31.46, 7.48, 11.28);
69 std::cout <<
"\nTest no intersection." << std::endl;
70 std::cout <<
"a=" << a << std::endl;
71 std::cout <<
"b=" << b << std::endl;
72 std::cout <<
"intersect=" << intersect << std::endl;
74 if (intersect !=
vpRect()) {
75 std::cerr <<
"Problem with the intersection function!" << std::endl;
80 std::cout <<
"a=" << a << std::endl;
83 std::cerr <<
"Problem with the intersection function!" << std::endl;
87 std::cout <<
"vpRect is ok." << std::endl;
Defines a rectangle in the plane.