5#ifndef COAL_SERIALIZATION_GEOMETRIC_SHAPES_H
6#define COAL_SERIALIZATION_GEOMETRIC_SHAPES_H
13namespace serialization {
15template <
class Archive>
17 const unsigned int ) {
20 boost::serialization::base_object<coal::CollisionGeometry>(shape_base));
22 ar& make_nvp(
"swept_sphere_radius", radius);
24 if (Archive::is_loading::value) {
29template <
class Archive>
31 const unsigned int ) {
33 boost::serialization::base_object<coal::ShapeBase>(triangle));
34 ar& make_nvp(
"a", triangle.
a);
35 ar& make_nvp(
"b", triangle.
b);
36 ar& make_nvp(
"c", triangle.
c);
39template <
class Archive>
41 ar& make_nvp(
"base", boost::serialization::base_object<coal::ShapeBase>(box));
42 ar& make_nvp(
"halfSide", box.
halfSide);
45template <
class Archive>
47 const unsigned int ) {
49 boost::serialization::base_object<coal::ShapeBase>(sphere));
50 ar& make_nvp(
"radius", sphere.
radius);
53template <
class Archive>
55 const unsigned int ) {
57 boost::serialization::base_object<coal::ShapeBase>(ellipsoid));
58 ar& make_nvp(
"radii", ellipsoid.
radii);
61template <
class Archive>
63 const unsigned int ) {
65 boost::serialization::base_object<coal::ShapeBase>(capsule));
66 ar& make_nvp(
"radius", capsule.
radius);
67 ar& make_nvp(
"halfLength", capsule.
halfLength);
70template <
class Archive>
73 boost::serialization::base_object<coal::ShapeBase>(cone));
74 ar& make_nvp(
"radius", cone.
radius);
78template <
class Archive>
80 const unsigned int ) {
82 boost::serialization::base_object<coal::ShapeBase>(cylinder));
83 ar& make_nvp(
"radius", cylinder.
radius);
84 ar& make_nvp(
"halfLength", cylinder.
halfLength);
87template <
class Archive>
89 const unsigned int ) {
91 boost::serialization::base_object<coal::ShapeBase>(half_space));
92 ar& make_nvp(
"n", half_space.
n);
93 ar& make_nvp(
"d", half_space.
d);
96template <
class Archive>
98 const unsigned int ) {
100 boost::serialization::base_object<coal::ShapeBase>(plane));
101 ar& make_nvp(
"n", plane.
n);
102 ar& make_nvp(
"d", plane.
d);
Center at zero point, axis aligned box.
Definition geometric_shapes.h:164
Vec3s halfSide
box side half-length
Definition geometric_shapes.h:187
Capsule It is where is the distance between the point x and the capsule segment AB,...
Definition geometric_shapes.h:381
Scalar halfLength
Half Length along z axis.
Definition geometric_shapes.h:400
Scalar radius
Radius of capsule.
Definition geometric_shapes.h:397
Cone The base of the cone is at and the top is at .
Definition geometric_shapes.h:466
Scalar halfLength
Half Length along z axis.
Definition geometric_shapes.h:485
Scalar radius
Radius of the cone.
Definition geometric_shapes.h:482
Cylinder along Z axis. The cylinder is defined at its centroid.
Definition geometric_shapes.h:556
Scalar radius
Radius of the cylinder.
Definition geometric_shapes.h:580
Scalar halfLength
Half Length along z axis.
Definition geometric_shapes.h:583
Ellipsoid centered at point zero.
Definition geometric_shapes.h:303
Vec3s radii
Radii of the Ellipsoid (such that on boundary: x^2/rx^2 + y^2/ry^2.
Definition geometric_shapes.h:319
Half Space: this is equivalent to the Plane in ODE. A Half space has a priviledged direction: the dir...
Definition geometric_shapes.h:963
Vec3s n
Plane normal.
Definition geometric_shapes.h:1027
Scalar d
Plane offset.
Definition geometric_shapes.h:1030
Infinite plane. A plane can be viewed as two half spaces; it has no priviledged direction....
Definition geometric_shapes.h:1054
Vec3s n
Plane normal.
Definition geometric_shapes.h:1104
Scalar d
Plane offset.
Definition geometric_shapes.h:1107
Base class for all basic geometric shapes.
Definition geometric_shapes.h:58
void setSweptSphereRadius(Scalar radius)
Set radius of sphere swept around the shape. Must be >= 0.
Definition geometric_shapes.h:76
Scalar getSweptSphereRadius() const
Get radius of sphere swept around the shape. This radius is always >= 0.
Definition geometric_shapes.h:86
Center at zero point sphere.
Definition geometric_shapes.h:238
Scalar radius
Radius of the sphere.
Definition geometric_shapes.h:251
Triangle stores the points instead of only indices of points.
Definition geometric_shapes.h:108
Vec3s a
Definition geometric_shapes.h:147
Vec3s b
Definition geometric_shapes.h:147
Vec3s c
Definition geometric_shapes.h:147
#define COAL_SERIALIZATION_DECLARE_EXPORT(T)
Definition fwd.h:30
void serialize(Archive &ar, coal::AABB &aabb, const unsigned int)
Definition AABB.h:15
Main namespace.
Definition broadphase_bruteforce.h:44
double Scalar
Definition data_types.h:68