40 #include <visp3/core/vpIoTools.h>
41 #include <visp3/core/vpXmlParserHomogeneousMatrix.h>
45 #ifdef ENABLE_VISP_NAMESPACE
48 #if defined(VISP_HAVE_PUGIXML)
53 std::cout <<
"Create: " << tmp_dir << std::endl;
59 std::string filename = tmp_dir +
"test_write_homogeneous.xml";
62 std::cout <<
"Write to: " << filename << std::endl;
64 std::cerr <<
"Cannot save XML file: " << filename << std::endl;
72 xml.
parse(cMo_read, filename,
"cMo");
73 std::cout <<
"cMo write:\n" << cMo << std::endl;
74 std::cout <<
"cMo read:\n" << cMo_read << std::endl;
75 for (
unsigned int i = 0; i < 3; i++) {
76 for (
unsigned int j = 0; j < 3; j++) {
77 if (!
vpMath::equal(cMo[i][j], cMo_read[i][j], std::numeric_limits<double>::epsilon())) {
78 std::cerr <<
"Issue when parsing XML file: " << filename << std::endl;
Implementation of an homogeneous matrix and operations on such kind of matrices.
static double rad(double deg)
static bool equal(double x, double y, double threshold=0.001)
Implementation of a rotation vector as axis-angle minimal representation.
Class that consider the case of a translation vector.
XML parser to load and save an homogeneous matrix in a file.
int parse(vpHomogeneousMatrix &M, const std::string &filename, const std::string &name)
int save(const vpHomogeneousMatrix &M, const std::string &filename, const std::string &name)