Line |
Branch |
Exec |
Source |
1 |
|
|
// |
2 |
|
|
// Copyright (c) 2019 INRIA |
3 |
|
|
// |
4 |
|
|
|
5 |
|
|
#ifndef __pinocchio_serialization_se3_hpp__ |
6 |
|
|
#define __pinocchio_serialization_se3_hpp__ |
7 |
|
|
|
8 |
|
|
#include "pinocchio/spatial/se3.hpp" |
9 |
|
|
#include "pinocchio/serialization/fwd.hpp" |
10 |
|
|
|
11 |
|
|
#include <boost/serialization/split_free.hpp> |
12 |
|
|
#include <boost/serialization/vector.hpp> |
13 |
|
|
|
14 |
|
|
namespace boost |
15 |
|
|
{ |
16 |
|
|
namespace serialization |
17 |
|
|
{ |
18 |
|
|
|
19 |
|
|
template<class Archive, typename Scalar, int Options> |
20 |
|
|
void |
21 |
|
✗ |
save(Archive & ar, const pinocchio::SE3Tpl<Scalar, Options> & M, const unsigned int /*version*/) |
22 |
|
|
{ |
23 |
|
✗ |
ar & make_nvp("translation", make_array(M.translation().data(), 3)); |
24 |
|
✗ |
ar & make_nvp("rotation", make_array(M.rotation().data(), 9)); |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
template<class Archive, typename Scalar, int Options> |
28 |
|
✗ |
void load(Archive & ar, pinocchio::SE3Tpl<Scalar, Options> & M, const unsigned int /*version*/) |
29 |
|
|
{ |
30 |
|
✗ |
ar >> make_nvp("translation", make_array(M.translation().data(), 3)); |
31 |
|
✗ |
ar >> make_nvp("rotation", make_array(M.rotation().data(), 9)); |
32 |
|
|
} |
33 |
|
|
|
34 |
|
|
template<class Archive, typename Scalar, int Options> |
35 |
|
✗ |
void serialize(Archive & ar, pinocchio::SE3Tpl<Scalar, Options> & M, const unsigned int version) |
36 |
|
|
{ |
37 |
|
✗ |
split_free(ar, M, version); |
38 |
|
|
} |
39 |
|
|
|
40 |
|
|
} // namespace serialization |
41 |
|
|
} // namespace boost |
42 |
|
|
|
43 |
|
|
#endif // ifndef __pinocchio_serialization_se3_hpp__ |
44 |
|
|
|