38 #include <visp3/core/vpConfig.h>
39 #include <visp3/core/vpRect.h>
43 #ifdef ENABLE_VISP_NAMESPACE
46 vpRect c(10.1, 15.05, 19.63, 7.84);
47 vpRect a(c.getLeft() - 12.456, c.getTop() - 7.75, c.getWidth() + 12.456, c.getHeight() + 7.75);
48 vpRect b(c.getLeft(), c.getTop(), c.getWidth() + 8.81, c.getHeight() + 14.57);
52 std::cout <<
"Test intersection." << std::endl;
53 std::cout <<
"a=" << a << std::endl;
54 std::cout <<
"b=" << b << std::endl;
55 std::cout <<
"c=" << c << std::endl;
56 std::cout <<
"intersect=" << intersect << std::endl;
59 std::cerr <<
"Problem with the intersection function!" << std::endl;
64 std::cout <<
"a=" << a << std::endl;
67 std::cerr <<
"Problem with the intersection function!" << std::endl;
71 a =
vpRect(11.45, 15.67, 3.5, 7.81);
72 b =
vpRect(24.78, 31.46, 7.48, 11.28);
75 std::cout <<
"\nTest no intersection." << std::endl;
76 std::cout <<
"a=" << a << std::endl;
77 std::cout <<
"b=" << b << std::endl;
78 std::cout <<
"intersect=" << intersect << std::endl;
80 if (intersect !=
vpRect()) {
81 std::cerr <<
"Problem with the intersection function!" << std::endl;
86 std::cout <<
"a=" << a << std::endl;
89 std::cerr <<
"Problem with the intersection function!" << std::endl;
93 std::cout <<
"vpRect is ok." << std::endl;
Defines a rectangle in the plane.