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

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

collision_object.h
Go to the documentation of this file.
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 {
15 namespace serialization
16 {
17
18 template <class Archive>
19 void save(Archive & ar,
20 const hpp::fcl::CollisionGeometry & collision_geometry,
21 const unsigned int /*version*/)
22 {
23 ar & make_nvp("aabb_center",collision_geometry.aabb_center);
24 ar & make_nvp("aabb_radius",collision_geometry.aabb_radius);
25 ar & make_nvp("aabb_local",collision_geometry.aabb_local);
26 ar & make_nvp("cost_density",collision_geometry.cost_density);
27 ar & make_nvp("threshold_occupied",collision_geometry.threshold_occupied);
28 ar & make_nvp("threshold_free",collision_geometry.threshold_free);
29 }
30
31 template <class Archive>
32 void load(Archive & ar,
33 hpp::fcl::CollisionGeometry & collision_geometry,
34 const unsigned int /*version*/)
35 {
36 ar >> make_nvp("aabb_center",collision_geometry.aabb_center);
37 ar >> make_nvp("aabb_radius",collision_geometry.aabb_radius);
38 ar >> make_nvp("aabb_local",collision_geometry.aabb_local);
39 ar >> make_nvp("cost_density",collision_geometry.cost_density);
40 ar >> make_nvp("threshold_occupied",collision_geometry.threshold_occupied);
41 ar >> make_nvp("threshold_free",collision_geometry.threshold_free);
42 collision_geometry.user_data = NULL; // no way to recover this
43 }
44
45 HPP_FCL_SERIALIZATION_SPLIT(hpp::fcl::CollisionGeometry)
46
47 }
48 }
49
50 #endif // ifndef HPP_FCL_SERIALIZATION_COLLISION_OBJECT_H
hpp::fcl::CollisionGeometry
The geometry for the object for collision or distance computation.
Definition: collision_object.h:66
collision_object.h
fwd.h
HPP_FCL_SERIALIZATION_SPLIT
#define HPP_FCL_SERIALIZATION_SPLIT(Type)
Definition: fwd.h:13
hpp::fcl::CollisionGeometry::cost_density
FCL_REAL cost_density
collision cost for unit volume
Definition: collision_object.h:158
hpp::fcl::CollisionGeometry::aabb_local
AABB aabb_local
AABB in local coordinate, used for tight AABB when only translation transform.
Definition: collision_object.h:152
hpp::fcl::CollisionGeometry::threshold_occupied
FCL_REAL threshold_occupied
threshold for occupied ( >= is occupied)
Definition: collision_object.h:161
hpp::fcl::CollisionGeometry::aabb_radius
FCL_REAL aabb_radius
AABB radius.
Definition: collision_object.h:149
hpp::fcl::CollisionGeometry::user_data
void * user_data
pointer to user defined data specific to this object
Definition: collision_object.h:155
hpp::fcl::CollisionGeometry::threshold_free
FCL_REAL threshold_free
threshold for free (<= is free)
Definition: collision_object.h:164
hpp::fcl::CollisionGeometry::aabb_center
Vec3f aabb_center
AABB center in local coordinate.
Definition: collision_object.h:146
boost::serialization::save
void save(Archive &ar, const hpp::fcl::BVSplitter< BV > &splitter_, const unsigned int)
Definition: BV_splitter.h:34
boost::serialization::load
void load(Archive &ar, hpp::fcl::BVSplitter< BV > &splitter_, const unsigned int)
Definition: BV_splitter.h:50
boost
Definition: AABB.h:12
AABB.h