Line |
Branch |
Exec |
Source |
1 |
|
|
// |
2 |
|
|
// Copyright (c) 2019 INRIA |
3 |
|
|
// |
4 |
|
|
|
5 |
|
|
#ifndef __pinocchio_serialization_joints_transform_hpp__ |
6 |
|
|
#define __pinocchio_serialization_joints_transform_hpp__ |
7 |
|
|
|
8 |
|
|
#include "pinocchio/spatial/motion.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, int axis> |
20 |
|
✗ |
void serialize( |
21 |
|
|
Archive & ar, |
22 |
|
|
pinocchio::TransformRevoluteTpl<Scalar, Options, axis> & m, |
23 |
|
|
const unsigned int /*version*/) |
24 |
|
|
{ |
25 |
|
✗ |
ar & make_nvp("sin", m.sin()); |
26 |
|
✗ |
ar & make_nvp("cos", m.cos()); |
27 |
|
|
} |
28 |
|
|
|
29 |
|
|
template<class Archive, typename Scalar, int Options, int axis> |
30 |
|
✗ |
void serialize( |
31 |
|
|
Archive & ar, |
32 |
|
|
pinocchio::TransformPrismaticTpl<Scalar, Options, axis> & m, |
33 |
|
|
const unsigned int /*version*/) |
34 |
|
|
{ |
35 |
|
✗ |
ar & make_nvp("displacement", m.displacement()); |
36 |
|
|
} |
37 |
|
|
|
38 |
|
|
template<class Archive, typename Scalar, int Options, int axis> |
39 |
|
✗ |
void serialize( |
40 |
|
|
Archive & ar, |
41 |
|
|
pinocchio::TransformHelicalTpl<Scalar, Options, axis> & m, |
42 |
|
|
const unsigned int /*version*/) |
43 |
|
|
{ |
44 |
|
✗ |
ar & make_nvp("sin", m.sin()); |
45 |
|
✗ |
ar & make_nvp("cos", m.cos()); |
46 |
|
✗ |
ar & make_nvp("displacement", m.displacement()); |
47 |
|
|
} |
48 |
|
|
|
49 |
|
|
template<class Archive, typename Scalar, int Options> |
50 |
|
✗ |
void serialize( |
51 |
|
|
Archive & ar, |
52 |
|
|
pinocchio::TransformTranslationTpl<Scalar, Options> & m, |
53 |
|
|
const unsigned int /*version*/) |
54 |
|
|
{ |
55 |
|
✗ |
ar & make_nvp("translation", m.translation()); |
56 |
|
|
} |
57 |
|
|
|
58 |
|
|
} // namespace serialization |
59 |
|
|
} // namespace boost |
60 |
|
|
|
61 |
|
|
#endif // ifndef __pinocchio_serialization_joints_transform_hpp__ |
62 |
|
|
|