| Directory: | ./ |
|---|---|
| File: | include/pinocchio/serialization/joints-motion-subspace.hpp |
| Date: | 2025-02-12 21:03:38 |
| Exec | Total | Coverage | |
|---|---|---|---|
| Lines: | 38 | 38 | 100.0% |
| Branches: | 10 | 20 | 50.0% |
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // | ||
| 2 | // Copyright (c) 2019-2020 INRIA | ||
| 3 | // | ||
| 4 | |||
| 5 | #ifndef __pinocchio_serialization_joints_motion_subspace_hpp__ | ||
| 6 | #define __pinocchio_serialization_joints_motion_subspace_hpp__ | ||
| 7 | |||
| 8 | #include "pinocchio/serialization/fwd.hpp" | ||
| 9 | |||
| 10 | #include <boost/serialization/split_free.hpp> | ||
| 11 | #include <boost/serialization/vector.hpp> | ||
| 12 | |||
| 13 | namespace boost | ||
| 14 | { | ||
| 15 | namespace serialization | ||
| 16 | { | ||
| 17 | |||
| 18 | template<class Archive, typename Scalar, int Options, int axis> | ||
| 19 | 1508 | void serialize( | |
| 20 | Archive & /*ar*/, | ||
| 21 | pinocchio::JointMotionSubspaceRevoluteTpl<Scalar, Options, axis> & /*S*/, | ||
| 22 | const unsigned int /*version*/) | ||
| 23 | { | ||
| 24 | 1508 | } | |
| 25 | |||
| 26 | template<class Archive, typename Scalar, int Options, int axis> | ||
| 27 | 168 | void serialize( | |
| 28 | Archive & /*ar*/, | ||
| 29 | pinocchio::JointMotionSubspacePrismaticTpl<Scalar, Options, axis> & /*S*/, | ||
| 30 | const unsigned int /*version*/) | ||
| 31 | { | ||
| 32 | 168 | } | |
| 33 | |||
| 34 | template<class Archive, typename Scalar, int Options, int axis> | ||
| 35 | 168 | void serialize( | |
| 36 | Archive & ar, | ||
| 37 | pinocchio::JointMotionSubspaceHelicalTpl<Scalar, Options, axis> & S, | ||
| 38 | const unsigned int /*version*/) | ||
| 39 | { | ||
| 40 |
1/2✓ Branch 3 taken 84 times.
✗ Branch 4 not taken.
|
168 | ar & make_nvp("h", S.h()); |
| 41 | 168 | } | |
| 42 | |||
| 43 | template<class Archive, typename Scalar, int Options> | ||
| 44 | 56 | void serialize( | |
| 45 | Archive & /*ar*/, | ||
| 46 | pinocchio::JointMotionSubspaceSphericalTpl<Scalar, Options> & /*S*/, | ||
| 47 | const unsigned int /*version*/) | ||
| 48 | { | ||
| 49 | 56 | } | |
| 50 | |||
| 51 | template<class Archive, typename Scalar, int Options> | ||
| 52 | 56 | void serialize( | |
| 53 | Archive & /*ar*/, | ||
| 54 | pinocchio::JointMotionSubspaceTranslationTpl<Scalar, Options> & /*S*/, | ||
| 55 | const unsigned int /*version*/) | ||
| 56 | { | ||
| 57 | 56 | } | |
| 58 | |||
| 59 | template<class Archive, typename Scalar, int Options> | ||
| 60 | 88 | void serialize( | |
| 61 | Archive & /*ar*/, | ||
| 62 | pinocchio::JointMotionSubspaceIdentityTpl<Scalar, Options> & /*S*/, | ||
| 63 | const unsigned int /*version*/) | ||
| 64 | { | ||
| 65 | 88 | } | |
| 66 | |||
| 67 | template<class Archive, typename Scalar, int Options> | ||
| 68 | 112 | void serialize( | |
| 69 | Archive & ar, | ||
| 70 | pinocchio::JointMotionSubspaceRevoluteUnalignedTpl<Scalar, Options> & S, | ||
| 71 | const unsigned int /*version*/) | ||
| 72 | { | ||
| 73 |
1/2✓ Branch 3 taken 56 times.
✗ Branch 4 not taken.
|
112 | ar & make_nvp("axis", S.axis()); |
| 74 | 112 | } | |
| 75 | |||
| 76 | template<class Archive, typename Scalar, int Options> | ||
| 77 | 56 | void serialize( | |
| 78 | Archive & ar, | ||
| 79 | pinocchio::JointMotionSubspacePrismaticUnalignedTpl<Scalar, Options> & S, | ||
| 80 | const unsigned int /*version*/) | ||
| 81 | { | ||
| 82 |
1/2✓ Branch 3 taken 28 times.
✗ Branch 4 not taken.
|
56 | ar & make_nvp("axis", S.axis()); |
| 83 | 56 | } | |
| 84 | |||
| 85 | template<class Archive, typename Scalar, int Options> | ||
| 86 | 56 | void serialize( | |
| 87 | Archive & ar, | ||
| 88 | pinocchio::JointMotionSubspaceHelicalUnalignedTpl<Scalar, Options> & S, | ||
| 89 | const unsigned int /*version*/) | ||
| 90 | { | ||
| 91 |
1/2✓ Branch 3 taken 28 times.
✗ Branch 4 not taken.
|
56 | ar & make_nvp("axis", S.axis()); |
| 92 |
1/2✓ Branch 3 taken 28 times.
✗ Branch 4 not taken.
|
56 | ar & make_nvp("h", S.h()); |
| 93 | 56 | } | |
| 94 | |||
| 95 | template<class Archive, typename Scalar, int Options> | ||
| 96 | 56 | void serialize( | |
| 97 | Archive & ar, | ||
| 98 | pinocchio::JointMotionSubspaceUniversalTpl<Scalar, Options> & S, | ||
| 99 | const unsigned int /*version*/) | ||
| 100 | { | ||
| 101 |
1/2✓ Branch 3 taken 28 times.
✗ Branch 4 not taken.
|
56 | ar & make_nvp("angularSubspace", S.angularSubspace()); |
| 102 | 56 | } | |
| 103 | |||
| 104 | template<class Archive, int Dim, typename Scalar, int Options> | ||
| 105 | 56 | void serialize( | |
| 106 | Archive & ar, | ||
| 107 | pinocchio::JointMotionSubspaceTpl<Dim, Scalar, Options> & S, | ||
| 108 | const unsigned int /*version*/) | ||
| 109 | { | ||
| 110 |
1/2✓ Branch 3 taken 28 times.
✗ Branch 4 not taken.
|
56 | ar & make_nvp("matrix", S.matrix()); |
| 111 | 56 | } | |
| 112 | |||
| 113 | template<class Archive, class Constraint> | ||
| 114 | 168 | void serialize( | |
| 115 | Archive & ar, | ||
| 116 | pinocchio::ScaledJointMotionSubspace<Constraint> & S, | ||
| 117 | const unsigned int /*version*/) | ||
| 118 | { | ||
| 119 |
1/2✓ Branch 3 taken 84 times.
✗ Branch 4 not taken.
|
168 | ar & make_nvp("scaling", S.scaling()); |
| 120 |
1/2✓ Branch 3 taken 84 times.
✗ Branch 4 not taken.
|
168 | ar & make_nvp("constraint", S.constraint()); |
| 121 | 168 | } | |
| 122 | |||
| 123 | template<class Archive, typename Scalar, int Options> | ||
| 124 | 56 | void serialize( | |
| 125 | Archive & /*ar*/, | ||
| 126 | pinocchio::JointMotionSubspacePlanarTpl<Scalar, Options> & /*S*/, | ||
| 127 | const unsigned int /*version*/) | ||
| 128 | { | ||
| 129 | 56 | } | |
| 130 | |||
| 131 | template<class Archive, typename Scalar, int Options> | ||
| 132 | 56 | void serialize( | |
| 133 | Archive & ar, | ||
| 134 | pinocchio::JointMotionSubspaceSphericalZYXTpl<Scalar, Options> & S, | ||
| 135 | const unsigned int /*version*/) | ||
| 136 | { | ||
| 137 |
1/2✓ Branch 3 taken 28 times.
✗ Branch 4 not taken.
|
56 | ar & make_nvp("angularSubspace", S.angularSubspace()); |
| 138 | 56 | } | |
| 139 | |||
| 140 | } // namespace serialization | ||
| 141 | } // namespace boost | ||
| 142 | |||
| 143 | #endif // ifndef __pinocchio_serialization_joints_motion_subspace_hpp__ | ||
| 144 |