Go to the documentation of this file.
5 #ifndef COAL_SERIALIZATION_CONTACT_PATCH_H
6 #define COAL_SERIALIZATION_CONTACT_PATCH_H
13 namespace serialization {
15 template <
class Archive>
17 const unsigned int ) {
19 typedef Eigen::Matrix<CoalScalar, 2, Eigen::Dynamic> PolygonPoints;
21 size_t patch_size = contact_patch.
size();
22 ar& make_nvp(
"patch_size", patch_size);
24 if (Archive::is_loading::value) {
25 contact_patch.
points().resize(patch_size);
27 Eigen::Map<PolygonPoints> points_map(
29 static_cast<Eigen::Index
>(patch_size));
30 ar& make_nvp(
"points", points_map);
34 ar& make_nvp(
"direction", contact_patch.
direction);
35 ar& make_nvp(
"tf", contact_patch.
tf);
38 template <
class Archive>
40 const unsigned int ) {
47 ar& make_nvp(
"num_samples_curved_shapes", num_samples_curved_shapes);
48 ar& make_nvp(
"patch_tolerance", num_samples_curved_shapes);
50 if (Archive::is_loading::value) {
56 template <
class Archive>
58 const unsigned int ) {
62 ar& make_nvp(
"num_patches", num_patches);
64 std::vector<ContactPatch> patches;
65 patches.resize(num_patches);
66 if (Archive::is_loading::value) {
67 ar& make_nvp(
"patches", patches);
71 for (
size_t i = 0; i < num_patches; ++i) {
77 for (
size_t i = 0; i < num_patches; ++i) {
80 ar& make_nvp(
"patches", patches);
87 #endif // COAL_SERIALIZATION_CONTACT_PATCH_H
void serialize(Archive &ar, coal::AABB &aabb, const unsigned int)
hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:57