1 |
|
|
// |
2 |
|
|
// Copyright (c) 2021 INRIA |
3 |
|
|
// |
4 |
|
|
|
5 |
|
|
#ifndef HPP_FCL_SERIALIZATION_COLLISION_OBJECT_H |
6 |
|
|
#define HPP_FCL_SERIALIZATION_COLLISION_OBJECT_H |
7 |
|
|
|
8 |
|
|
#include "hpp/fcl/collision_object.h" |
9 |
|
|
|
10 |
|
|
#include "hpp/fcl/serialization/fwd.h" |
11 |
|
|
#include "hpp/fcl/serialization/AABB.h" |
12 |
|
|
|
13 |
|
|
namespace boost { |
14 |
|
|
namespace serialization { |
15 |
|
|
|
16 |
|
|
template <class Archive> |
17 |
|
78 |
void save(Archive& ar, const hpp::fcl::CollisionGeometry& collision_geometry, |
18 |
|
|
const unsigned int /*version*/) { |
19 |
✓✗ |
78 |
ar& make_nvp("aabb_center", collision_geometry.aabb_center); |
20 |
✓✗ |
78 |
ar& make_nvp("aabb_radius", collision_geometry.aabb_radius); |
21 |
✓✗ |
78 |
ar& make_nvp("aabb_local", collision_geometry.aabb_local); |
22 |
✓✗ |
78 |
ar& make_nvp("cost_density", collision_geometry.cost_density); |
23 |
✓✗ |
78 |
ar& make_nvp("threshold_occupied", collision_geometry.threshold_occupied); |
24 |
✓✗ |
78 |
ar& make_nvp("threshold_free", collision_geometry.threshold_free); |
25 |
|
78 |
} |
26 |
|
|
|
27 |
|
|
template <class Archive> |
28 |
|
78 |
void load(Archive& ar, hpp::fcl::CollisionGeometry& collision_geometry, |
29 |
|
|
const unsigned int /*version*/) { |
30 |
✓✗ |
78 |
ar >> make_nvp("aabb_center", collision_geometry.aabb_center); |
31 |
✓✗ |
78 |
ar >> make_nvp("aabb_radius", collision_geometry.aabb_radius); |
32 |
✓✗ |
78 |
ar >> make_nvp("aabb_local", collision_geometry.aabb_local); |
33 |
✓✗ |
78 |
ar >> make_nvp("cost_density", collision_geometry.cost_density); |
34 |
✓✗ |
78 |
ar >> make_nvp("threshold_occupied", collision_geometry.threshold_occupied); |
35 |
✓✗ |
78 |
ar >> make_nvp("threshold_free", collision_geometry.threshold_free); |
36 |
|
78 |
collision_geometry.user_data = NULL; // no way to recover this |
37 |
|
78 |
} |
38 |
|
|
|
39 |
|
172 |
HPP_FCL_SERIALIZATION_SPLIT(hpp::fcl::CollisionGeometry) |
40 |
|
|
|
41 |
|
|
} // namespace serialization |
42 |
|
|
} // namespace boost |
43 |
|
|
|
44 |
|
|
#endif // ifndef HPP_FCL_SERIALIZATION_COLLISION_OBJECT_H |