src/serialization/motion.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019 INRIA
3 //
4 
5 #ifndef __pinocchio_serialization_motion_hpp__
6 #define __pinocchio_serialization_motion_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>
20  void save(Archive & ar,
22  const unsigned int /*version*/)
23  {
24  ar & make_nvp("linear",make_array(m.linear().data(),3));
25  ar & make_nvp("angular",make_array(m.angular().data(),3));
26  }
27 
28  template <class Archive, typename Scalar, int Options>
29  void load(Archive & ar,
31  const unsigned int /*version*/)
32  {
33  ar >> make_nvp("linear",make_array(m.linear().data(),3));
34  ar >> make_nvp("angular",make_array(m.angular().data(),3));
35  }
36 
37  template <class Archive, typename Scalar, int Options>
38  void serialize(Archive & ar,
40  const unsigned int version)
41  {
42  split_free(ar,m,version);
43  }
44 
45  template <class Archive, typename Scalar, int Options>
46  void serialize(Archive & /*ar*/,
48  const unsigned int /*version*/)
49  {
50  // Nothing to do
51  }
52 
53  }
54 }
55 
56 #endif // ifndef __pinocchio_serialization_motion_hpp__
57 
58 
void save(Archive &ar, const hpp::fcl::Contact &contact, const unsigned int)
void serialize(Archive &ar, hpp::fcl::AABB &aabb, const unsigned int)
ConstLinearType linear() const
Definition: motion-base.hpp:22
ConstAngularType angular() const
Definition: motion-base.hpp:21
void load(Archive &ar, hpp::fcl::Contact &contact, const unsigned int)
const nvp< typename pinocchio::container::aligned_vector< T >::vector_base > make_nvp(const char *name, pinocchio::container::aligned_vector< T > &t)


pinocchio
Author(s):
autogenerated on Fri Jun 23 2023 02:38:32