serialization/geometric_shapes.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2021 INRIA
3 //
4 
5 #ifndef HPP_FCL_SERIALIZATION_GEOMETRIC_SHAPES_H
6 #define HPP_FCL_SERIALIZATION_GEOMETRIC_SHAPES_H
7 
10 
11 namespace boost {
12 namespace serialization {
13 
14 template <class Archive>
15 void serialize(Archive& ar, hpp::fcl::ShapeBase& shape_base,
16  const unsigned int /*version*/) {
17  ar& make_nvp("base",
18  boost::serialization::base_object<hpp::fcl::CollisionGeometry>(
19  shape_base));
20 }
21 
22 template <class Archive>
23 void serialize(Archive& ar, hpp::fcl::TriangleP& triangle,
24  const unsigned int /*version*/) {
25  ar& make_nvp(
26  "base", boost::serialization::base_object<hpp::fcl::ShapeBase>(triangle));
27  ar& make_nvp("a", triangle.a);
28  ar& make_nvp("b", triangle.b);
29  ar& make_nvp("c", triangle.c);
30 }
31 
32 template <class Archive>
33 void serialize(Archive& ar, hpp::fcl::Box& box,
34  const unsigned int /*version*/) {
35  ar& make_nvp("base",
36  boost::serialization::base_object<hpp::fcl::ShapeBase>(box));
37  ar& make_nvp("halfSide", box.halfSide);
38 }
39 
40 template <class Archive>
41 void serialize(Archive& ar, hpp::fcl::Sphere& sphere,
42  const unsigned int /*version*/) {
43  ar& make_nvp("base",
44  boost::serialization::base_object<hpp::fcl::ShapeBase>(sphere));
45  ar& make_nvp("radius", sphere.radius);
46 }
47 
48 template <class Archive>
49 void serialize(Archive& ar, hpp::fcl::Ellipsoid& ellipsoid,
50  const unsigned int /*version*/) {
51  ar& make_nvp("base", boost::serialization::base_object<hpp::fcl::ShapeBase>(
52  ellipsoid));
53  ar& make_nvp("radii", ellipsoid.radii);
54 }
55 
56 template <class Archive>
57 void serialize(Archive& ar, hpp::fcl::Capsule& capsule,
58  const unsigned int /*version*/) {
59  ar& make_nvp("base",
60  boost::serialization::base_object<hpp::fcl::ShapeBase>(capsule));
61  ar& make_nvp("radius", capsule.radius);
62  ar& make_nvp("halfLength", capsule.halfLength);
63 }
64 
65 template <class Archive>
66 void serialize(Archive& ar, hpp::fcl::Cone& cone,
67  const unsigned int /*version*/) {
68  ar& make_nvp("base",
69  boost::serialization::base_object<hpp::fcl::ShapeBase>(cone));
70  ar& make_nvp("radius", cone.radius);
71  ar& make_nvp("halfLength", cone.halfLength);
72 }
73 
74 template <class Archive>
75 void serialize(Archive& ar, hpp::fcl::Cylinder& cylinder,
76  const unsigned int /*version*/) {
77  ar& make_nvp(
78  "base", boost::serialization::base_object<hpp::fcl::ShapeBase>(cylinder));
79  ar& make_nvp("radius", cylinder.radius);
80  ar& make_nvp("halfLength", cylinder.halfLength);
81 }
82 
83 template <class Archive>
84 void serialize(Archive& ar, hpp::fcl::Halfspace& half_space,
85  const unsigned int /*version*/) {
86  ar& make_nvp("base", boost::serialization::base_object<hpp::fcl::ShapeBase>(
87  half_space));
88  ar& make_nvp("n", half_space.n);
89  ar& make_nvp("d", half_space.d);
90 }
91 
92 template <class Archive>
93 void serialize(Archive& ar, hpp::fcl::Plane& plane,
94  const unsigned int /*version*/) {
95  ar& make_nvp("base",
96  boost::serialization::base_object<hpp::fcl::ShapeBase>(plane));
97  ar& make_nvp("n", plane.n);
98  ar& make_nvp("d", plane.d);
99 }
100 
101 } // namespace serialization
102 } // namespace boost
103 
104 #endif // ifndef HPP_FCL_SERIALIZATION_GEOMETRIC_SHAPES_H
hpp::fcl::Cylinder::radius
FCL_REAL radius
Radius of the cylinder.
Definition: shape/geometric_shapes.h:522
collision_manager.box
box
Definition: collision_manager.py:11
hpp::fcl::TriangleP::c
Vec3f c
Definition: shape/geometric_shapes.h:109
collision_manager.sphere
sphere
Definition: collision_manager.py:4
hpp::fcl::Sphere
Center at zero point sphere.
Definition: shape/geometric_shapes.h:196
hpp::fcl::Capsule::radius
FCL_REAL radius
Radius of capsule.
Definition: shape/geometric_shapes.h:346
fwd.h
boost
hpp::fcl::Cylinder
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: shape/geometric_shapes.h:501
hpp::fcl::Capsule::halfLength
FCL_REAL halfLength
Half Length along z axis.
Definition: shape/geometric_shapes.h:352
hpp::fcl::TriangleP::b
Vec3f b
Definition: shape/geometric_shapes.h:109
hpp::fcl::Cylinder::halfLength
FCL_REAL halfLength
Half Length along z axis.
Definition: shape/geometric_shapes.h:528
hpp::fcl::Ellipsoid
Ellipsoid centered at point zero.
Definition: shape/geometric_shapes.h:258
hpp::fcl::Cone
Cone The base of the cone is at and the top is at .
Definition: shape/geometric_shapes.h:414
hpp::fcl::Capsule
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition: shape/geometric_shapes.h:333
hpp::fcl::Cone::radius
FCL_REAL radius
Radius of the cone.
Definition: shape/geometric_shapes.h:427
hpp::fcl::TriangleP::a
Vec3f a
Definition: shape/geometric_shapes.h:109
hpp::fcl::Plane::d
FCL_REAL d
Plane offset.
Definition: shape/geometric_shapes.h:851
hpp::fcl::Halfspace
Half Space: this is equivalent to the Plane in ODE. The separation plane is defined as n * x = d; Poi...
Definition: shape/geometric_shapes.h:729
boost::serialization::serialize
void serialize(Archive &ar, hpp::fcl::AABB &aabb, const unsigned int)
Definition: serialization/AABB.h:15
hpp::fcl::TriangleP
Triangle stores the points instead of only indices of points.
Definition: shape/geometric_shapes.h:71
hpp::fcl::Cone::halfLength
FCL_REAL halfLength
Half Length along z axis.
Definition: shape/geometric_shapes.h:433
geometric_shapes.h
hpp::fcl::Plane::n
Vec3f n
Plane normal.
Definition: shape/geometric_shapes.h:848
hpp::fcl::ShapeBase
Base class for all basic geometric shapes.
Definition: shape/geometric_shapes.h:51
hpp::fcl::Halfspace::d
FCL_REAL d
Plane offset.
Definition: shape/geometric_shapes.h:790
hpp::fcl::Halfspace::n
Vec3f n
Plane normal.
Definition: shape/geometric_shapes.h:787
hpp::fcl::Ellipsoid::radii
Vec3f radii
Radii of the Ellipsoid (such that on boundary: x^2/rx^2 + y^2/ry^2.
Definition: shape/geometric_shapes.h:271
hpp::fcl::Box
Center at zero point, axis aligned box.
Definition: shape/geometric_shapes.h:125
hpp::fcl::Plane
Infinite plane.
Definition: shape/geometric_shapes.h:810


hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:13