42 #include <visp3/core/vpXmlParserRectOriented.h> 43 #include <visp3/core/vpIoTools.h> 48 std::string tmp_dir =
"C:/temp/";
50 std::string tmp_dir =
"/tmp/";
57 tmp_dir += username +
"/test_xml_parser_rect_oriented/";
59 std::cout <<
"Create: " << tmp_dir << std::endl;
63 std::string filename = tmp_dir +
"test_write_rect_oriented.xml";
67 std::cout <<
"Write to: " << filename << std::endl;
77 double eps = std::numeric_limits<double>::epsilon();
78 if (rect_oriented.getCenter() != rect_oriented_read.
getCenter() ||
82 std::cerr <<
"Issue when parsing XML file: " << filename << std::endl;
void setRectangle(const vpRectOriented &rectangle)
double getOrientation() const
Get the rectangle orientation (rad).
static bool equal(double x, double y, double s=0.001)
void save(const std::string &filename, bool append=false)
XML parser to load and save an oriented rectangle in a file.
double getWidth() const
Get the rectangle width.
static double rad(double deg)
double getHeight() const
Get the rectangle height.
vpRectOriented getRectangle() const
void parse(const std::string &filename)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
vpImagePoint getCenter() const
Get the rectangle center point.
Defines an oriented rectangle in the plane.