From f0bdc2d867766a02e886f9b7a6232b88375569a9 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 4 Mar 2024 19:31:20 +0000 Subject: [PATCH] Make Minkowski_sum_2 work --- .../AABB_collision_detector_2.h | 2 +- .../CGAL/Minkowski_sum_2/AABB_traits_2.h | 26 ++++++++++++------- .../AABB_traversal_traits_with_join.h | 2 +- .../Minkowski_sum_2/AABB_tree_with_join.h | 2 +- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_collision_detector_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_collision_detector_2.h index b926d680806..4a4d8ab4757 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_collision_detector_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_collision_detector_2.h @@ -37,7 +37,7 @@ public: typedef typename Polygon_2::Edge_const_iterator Edge_iterator; typedef AABB_segment_2_primitive Tree_segment_2; - typedef AABB_traits_2 Tree_traits; + typedef Minkowski_sum::AABB_traits_2 Tree_traits; typedef AABB_tree_with_join Tree_2; public: diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traits_2.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traits_2.h index 601fc8febc7..8317616c9a0 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traits_2.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traits_2.h @@ -13,12 +13,16 @@ #define CGAL_AABB_TRAITS_2_H #include +#include namespace CGAL { +namespace Minkowski_sum { + template class AABB_traits_2 + :public Search_traits_2 { public: @@ -37,18 +41,18 @@ public: // Types for AABB_tree typedef typename GeomTraits::FT FT; - typedef typename GeomTraits::Point_2 Point_3; - typedef typename GeomTraits::Circle_2 Sphere_3; - typedef typename GeomTraits::Iso_rectangle_2 Iso_cuboid_3; - typedef typename GeomTraits::Construct_center_2 Construct_center_3; - typedef typename GeomTraits::Construct_iso_rectangle_2 Construct_iso_cuboid_3; - typedef typename GeomTraits::Construct_min_vertex_2 Construct_min_vertex_3; - typedef typename GeomTraits::Construct_max_vertex_2 Construct_max_vertex_3; - typedef typename GeomTraits::Compute_squared_radius_2 Compute_squared_radius_3; + typedef typename GeomTraits::Point_2 Point_2; + typedef typename GeomTraits::Circle_2 Circle_2; + typedef typename GeomTraits::Iso_rectangle_2 Iso_rectangle_2; + typedef typename GeomTraits::Construct_center_2 Construct_center_2; + typedef typename GeomTraits::Construct_iso_rectangle_2 Construct_iso_cuboid_2; + typedef typename GeomTraits::Construct_min_vertex_2 Construct_min_vertex_2; + typedef typename GeomTraits::Construct_max_vertex_2 Construct_max_vertex_2; + typedef typename GeomTraits::Compute_squared_radius_2 Compute_squared_radius_2; typedef typename GeomTraits::Cartesian_const_iterator_2 - Cartesian_const_iterator_3; + Cartesian_const_iterator_2; typedef typename GeomTraits::Construct_cartesian_const_iterator_2 - Construct_cartesian_const_iterator_3; + Construct_cartesian_const_iterator_2; AABB_traits_2(const Point &translation_point): m_translation_point( translation_point) @@ -214,6 +218,8 @@ private: } }; +} // namespace Minkowski_sum + } // namespace CGAL #endif diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h index b44438f24e8..50a50030075 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_traversal_traits_with_join.h @@ -277,7 +277,7 @@ private: template class Do_intersect_joined_traits { - typedef typename AABBTraits::Point_3 Point; + typedef typename AABBTraits::Point Point; typedef typename AABBTraits::Primitive Primitive; typedef AABB_node_with_join Node; diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h index aabc398f739..9c97212c8c5 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_tree_with_join.h @@ -70,7 +70,7 @@ namespace CGAL { /// Type of 3D point. - typedef typename AABBTraits::Point_3 Point; + typedef typename AABBTraits::Point Point; /// Type of input primitive. typedef typename AABBTraits::Primitive Primitive;