#include <iostream>
#include <visp3/core/vpConfig.h>
#include <visp3/core/vpRect.h>
int main()
{
#ifdef ENABLE_VISP_NAMESPACE
#endif
vpRect c(10.1, 15.05, 19.63, 7.84);
std::cout << "Test intersection." << std::endl;
std::cout << "a=" << a << std::endl;
std::cout << "b=" << b << std::endl;
std::cout << "c=" << c << std::endl;
std::cout << "intersect=" << intersect << std::endl;
if (intersect != c) {
std::cerr << "Problem with the intersection function!" << std::endl;
return EXIT_FAILURE;
}
a &= b;
std::cout << "a=" << a << std::endl;
if (a != c) {
std::cerr << "Problem with the intersection function!" << std::endl;
return EXIT_FAILURE;
}
a =
vpRect(11.45, 15.67, 3.5, 7.81);
b =
vpRect(24.78, 31.46, 7.48, 11.28);
intersect = a & b;
std::cout << "\nTest no intersection." << std::endl;
std::cout << "a=" << a << std::endl;
std::cout << "b=" << b << std::endl;
std::cout << "intersect=" << intersect << std::endl;
std::cerr << "Problem with the intersection function!" << std::endl;
return EXIT_FAILURE;
}
a &= b;
std::cout << "a=" << a << std::endl;
std::cerr << "Problem with the intersection function!" << std::endl;
return EXIT_FAILURE;
}
std::cout << "vpRect is ok." << std::endl;
return EXIT_SUCCESS;
}
Defines a rectangle in the plane.