| Directory: | ./ |
|---|---|
| File: | include/pinocchio/serialization/joints-transform.hpp |
| Date: | 2025-02-12 21:03:38 |
| Exec | Total | Coverage | |
|---|---|---|---|
| Lines: | 15 | 15 | 100.0% |
| Branches: | 7 | 14 | 50.0% |
| 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 | 1508 | void serialize( | |
| 21 | Archive & ar, | ||
| 22 | pinocchio::TransformRevoluteTpl<Scalar, Options, axis> & m, | ||
| 23 | const unsigned int /*version*/) | ||
| 24 | { | ||
| 25 |
1/2✓ Branch 3 taken 754 times.
✗ Branch 4 not taken.
|
1508 | ar & make_nvp("sin", m.sin()); |
| 26 |
1/2✓ Branch 3 taken 754 times.
✗ Branch 4 not taken.
|
1508 | ar & make_nvp("cos", m.cos()); |
| 27 | 1508 | } | |
| 28 | |||
| 29 | template<class Archive, typename Scalar, int Options, int axis> | ||
| 30 | 168 | void serialize( | |
| 31 | Archive & ar, | ||
| 32 | pinocchio::TransformPrismaticTpl<Scalar, Options, axis> & m, | ||
| 33 | const unsigned int /*version*/) | ||
| 34 | { | ||
| 35 |
1/2✓ Branch 3 taken 84 times.
✗ Branch 4 not taken.
|
168 | ar & make_nvp("displacement", m.displacement()); |
| 36 | 168 | } | |
| 37 | |||
| 38 | template<class Archive, typename Scalar, int Options, int axis> | ||
| 39 | 168 | void serialize( | |
| 40 | Archive & ar, | ||
| 41 | pinocchio::TransformHelicalTpl<Scalar, Options, axis> & m, | ||
| 42 | const unsigned int /*version*/) | ||
| 43 | { | ||
| 44 |
1/2✓ Branch 3 taken 84 times.
✗ Branch 4 not taken.
|
168 | ar & make_nvp("sin", m.sin()); |
| 45 |
1/2✓ Branch 3 taken 84 times.
✗ Branch 4 not taken.
|
168 | ar & make_nvp("cos", m.cos()); |
| 46 |
1/2✓ Branch 3 taken 84 times.
✗ Branch 4 not taken.
|
168 | ar & make_nvp("displacement", m.displacement()); |
| 47 | 168 | } | |
| 48 | |||
| 49 | template<class Archive, typename Scalar, int Options> | ||
| 50 | 112 | void serialize( | |
| 51 | Archive & ar, | ||
| 52 | pinocchio::TransformTranslationTpl<Scalar, Options> & m, | ||
| 53 | const unsigned int /*version*/) | ||
| 54 | { | ||
| 55 |
1/2✓ Branch 3 taken 56 times.
✗ Branch 4 not taken.
|
112 | ar & make_nvp("translation", m.translation()); |
| 56 | 112 | } | |
| 57 | |||
| 58 | } // namespace serialization | ||
| 59 | } // namespace boost | ||
| 60 | |||
| 61 | #endif // ifndef __pinocchio_serialization_joints_transform_hpp__ | ||
| 62 |