hpp-fcl: include/hpp/fcl/serialization/geometric_shapes.h Source File

hpp-fcl 1.7.3 HPP fork of FCL -- The Flexible Collision Library

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
8 #include "hpp/fcl/shape/geometric_shapes.h"
9 #include "hpp/fcl/serialization/fwd.h"
10
11 namespace boost
12 {
13 namespace serialization
14 {
15
16 template <class Archive>
17 void serialize(Archive & ar,
18 hpp::fcl::ShapeBase & shape_base,
19 const unsigned int /*version*/)
20 {
21 ar & make_nvp("base",boost::serialization::base_object<hpp::fcl::CollisionGeometry>(shape_base));
22 }
23
24 template <class Archive>
25 void serialize(Archive & ar,
26 hpp::fcl::TriangleP & triangle,
27 const unsigned int /*version*/)
28 {
29 ar & make_nvp("base",boost::serialization::base_object<hpp::fcl::ShapeBase>(triangle));
30 ar & make_nvp("a",triangle.a);
31 ar & make_nvp("b",triangle.b);
32 ar & make_nvp("c",triangle.c);
33 }
34
35 template <class Archive>
36 void serialize(Archive & ar,
37 hpp::fcl::Box & box,
38 const unsigned int /*version*/)
39 {
40 ar & make_nvp("base",boost::serialization::base_object<hpp::fcl::ShapeBase>(box));
41 ar & make_nvp("halfSide",box.halfSide);
42 }
43
44 template <class Archive>
45 void serialize(Archive & ar,
46 hpp::fcl::Sphere & sphere,
47 const unsigned int /*version*/)
48 {
49 ar & make_nvp("base",boost::serialization::base_object<hpp::fcl::ShapeBase>(sphere));
50 ar & make_nvp("radius",sphere.radius);
51 }
52
53 template <class Archive>
54 void serialize(Archive & ar,
55 hpp::fcl::Capsule & capsule,
56 const unsigned int /*version*/)
57 {
58 ar & make_nvp("base",boost::serialization::base_object<hpp::fcl::ShapeBase>(capsule));
59 ar & make_nvp("radius",capsule.radius);
60 ar & make_nvp("halfLength",capsule.halfLength);
61 }
62
63 template <class Archive>
64 void serialize(Archive & ar,
65 hpp::fcl::Cone & cone,
66 const unsigned int /*version*/)
67 {
68 ar & make_nvp("base",boost::serialization::base_object<hpp::fcl::ShapeBase>(cone));
69 ar & make_nvp("radius",cone.radius);
70 ar & make_nvp("halfLength",cone.halfLength);
71 }
72
73 template <class Archive>
74 void serialize(Archive & ar,
75 hpp::fcl::Cylinder & cylinder,
76 const unsigned int /*version*/)
77 {
78 ar & make_nvp("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,
85 hpp::fcl::Halfspace & half_space,
86 const unsigned int /*version*/)
87 {
88 ar & make_nvp("base",boost::serialization::base_object<hpp::fcl::ShapeBase>(half_space));
89 ar & make_nvp("n",half_space.n);
90 ar & make_nvp("d",half_space.d);
91 }
92
93 template <class Archive>
94 void serialize(Archive & ar,
95 hpp::fcl::Plane & plane,
96 const unsigned int /*version*/)
97 {
98 ar & make_nvp("base",boost::serialization::base_object<hpp::fcl::ShapeBase>(plane));
99 ar & make_nvp("n",plane.n);
100 ar & make_nvp("d",plane.d);
101 }
102
103 }
104 }
105
106 #endif // ifndef HPP_FCL_SERIALIZATION_GEOMETRIC_SHAPES_H
hpp::fcl::Box
Center at zero point, axis aligned box.
Definition: geometric_shapes.h:103
hpp::fcl::Capsule
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition: geometric_shapes.h:193
hpp::fcl::Cone
Cone The base of the cone is at and the top is at .
Definition: geometric_shapes.h:250
hpp::fcl::Cylinder
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: geometric_shapes.h:306
hpp::fcl::Halfspace
Half Space: this is equivalent to the Plane in ODE. The separation plane is defined as n * x = d; Poi...
Definition: geometric_shapes.h:454
hpp::fcl::Plane
Infinite plane.
Definition: geometric_shapes.h:524
hpp::fcl::ShapeBase
Base class for all basic geometric shapes.
Definition: geometric_shapes.h:55
hpp::fcl::Sphere
Center at zero point sphere.
Definition: geometric_shapes.h:150
hpp::fcl::TriangleP
Triangle stores the points instead of only indices of points.
Definition: geometric_shapes.h:76
fwd.h
hpp::fcl::TriangleP::c
Vec3f c
Definition: geometric_shapes.h:96
hpp::fcl::Capsule::halfLength
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:214
hpp::fcl::TriangleP::a
Vec3f a
Definition: geometric_shapes.h:96
hpp::fcl::Cylinder::halfLength
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:327
hpp::fcl::Plane::n
Vec3f n
Plane normal.
Definition: geometric_shapes.h:576
hpp::fcl::Capsule::radius
FCL_REAL radius
Radius of capsule.
Definition: geometric_shapes.h:208
hpp::fcl::Halfspace::n
Vec3f n
Plane normal.
Definition: geometric_shapes.h:507
hpp::fcl::Cone::halfLength
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:271
hpp::fcl::Plane::d
FCL_REAL d
Plane offset.
Definition: geometric_shapes.h:579
hpp::fcl::Sphere::radius
FCL_REAL radius
Radius of the sphere.
Definition: geometric_shapes.h:163
hpp::fcl::Box::halfSide
Vec3f halfSide
box side half-length
Definition: geometric_shapes.h:125
hpp::fcl::Cone::radius
FCL_REAL radius
Radius of the cone.
Definition: geometric_shapes.h:265
hpp::fcl::Cylinder::radius
FCL_REAL radius
Radius of the cylinder.
Definition: geometric_shapes.h:321
hpp::fcl::TriangleP::b
Vec3f b
Definition: geometric_shapes.h:96
hpp::fcl::Halfspace::d
FCL_REAL d
Plane offset.
Definition: geometric_shapes.h:510
boost::serialization::serialize
void serialize(Archive &ar, hpp::fcl::AABB &aabb, const unsigned int)
Definition: AABB.h:17
boost
Definition: AABB.h:12
geometric_shapes.h