hpp-fcl 1.8.1
HPP fork of FCL -- The Flexible Collision Library
Loading...
Searching...
No Matches
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
11namespace 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
Center at zero point, axis aligned box.
Definition: geometric_shapes.h:103
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition: geometric_shapes.h:193
Cone The base of the cone is at and the top is at .
Definition: geometric_shapes.h:250
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition: geometric_shapes.h:306
Half Space: this is equivalent to the Plane in ODE. The separation plane is defined as n * x = d; Poi...
Definition: geometric_shapes.h:461
Infinite plane.
Definition: geometric_shapes.h:531
Base class for all basic geometric shapes.
Definition: geometric_shapes.h:55
Center at zero point sphere.
Definition: geometric_shapes.h:150
Triangle stores the points instead of only indices of points.
Definition: geometric_shapes.h:76
Vec3f c
Definition: geometric_shapes.h:96
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:214
Vec3f a
Definition: geometric_shapes.h:96
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:327
Vec3f n
Plane normal.
Definition: geometric_shapes.h:583
FCL_REAL radius
Radius of capsule.
Definition: geometric_shapes.h:211
Vec3f n
Plane normal.
Definition: geometric_shapes.h:514
FCL_REAL halfLength
Half Length along z axis.
Definition: geometric_shapes.h:271
FCL_REAL d
Plane offset.
Definition: geometric_shapes.h:586
FCL_REAL radius
Radius of the sphere.
Definition: geometric_shapes.h:166
Vec3f halfSide
box side half-length
Definition: geometric_shapes.h:125
FCL_REAL radius
Radius of the cone.
Definition: geometric_shapes.h:268
FCL_REAL radius
Radius of the cylinder.
Definition: geometric_shapes.h:324
Vec3f b
Definition: geometric_shapes.h:96
FCL_REAL d
Plane offset.
Definition: geometric_shapes.h:517
void serialize(Archive &ar, hpp::fcl::AABB &aabb, const unsigned int)
Definition: AABB.h:17
Definition: AABB.h:12