Make Minkowski_sum_2 work

This commit is contained in:
Andreas Fabri 2024-03-04 19:31:20 +00:00
parent b34c63c3f9
commit f0bdc2d867
4 changed files with 19 additions and 13 deletions

View File

@ -37,7 +37,7 @@ public:
typedef typename Polygon_2::Edge_const_iterator Edge_iterator; typedef typename Polygon_2::Edge_const_iterator Edge_iterator;
typedef AABB_segment_2_primitive<Kernel, Edge_iterator, Polygon_with_holes_2> typedef AABB_segment_2_primitive<Kernel, Edge_iterator, Polygon_with_holes_2>
Tree_segment_2; Tree_segment_2;
typedef AABB_traits_2<Kernel, Tree_segment_2> Tree_traits; typedef Minkowski_sum::AABB_traits_2<Kernel, Tree_segment_2> Tree_traits;
typedef AABB_tree_with_join<Tree_traits> Tree_2; typedef AABB_tree_with_join<Tree_traits> Tree_2;
public: public:

View File

@ -13,12 +13,16 @@
#define CGAL_AABB_TRAITS_2_H #define CGAL_AABB_TRAITS_2_H
#include <CGAL/license/Minkowski_sum_2.h> #include <CGAL/license/Minkowski_sum_2.h>
#include <CGAL/Search_traits_2.h>
namespace CGAL { namespace CGAL {
namespace Minkowski_sum {
template<typename GeomTraits, typename AABB_primitive_> template<typename GeomTraits, typename AABB_primitive_>
class AABB_traits_2 class AABB_traits_2
:public Search_traits_2<GeomTraits>
{ {
public: public:
@ -37,18 +41,18 @@ public:
// Types for AABB_tree // Types for AABB_tree
typedef typename GeomTraits::FT FT; typedef typename GeomTraits::FT FT;
typedef typename GeomTraits::Point_2 Point_3; typedef typename GeomTraits::Point_2 Point_2;
typedef typename GeomTraits::Circle_2 Sphere_3; typedef typename GeomTraits::Circle_2 Circle_2;
typedef typename GeomTraits::Iso_rectangle_2 Iso_cuboid_3; typedef typename GeomTraits::Iso_rectangle_2 Iso_rectangle_2;
typedef typename GeomTraits::Construct_center_2 Construct_center_3; typedef typename GeomTraits::Construct_center_2 Construct_center_2;
typedef typename GeomTraits::Construct_iso_rectangle_2 Construct_iso_cuboid_3; typedef typename GeomTraits::Construct_iso_rectangle_2 Construct_iso_cuboid_2;
typedef typename GeomTraits::Construct_min_vertex_2 Construct_min_vertex_3; typedef typename GeomTraits::Construct_min_vertex_2 Construct_min_vertex_2;
typedef typename GeomTraits::Construct_max_vertex_2 Construct_max_vertex_3; typedef typename GeomTraits::Construct_max_vertex_2 Construct_max_vertex_2;
typedef typename GeomTraits::Compute_squared_radius_2 Compute_squared_radius_3; typedef typename GeomTraits::Compute_squared_radius_2 Compute_squared_radius_2;
typedef typename GeomTraits::Cartesian_const_iterator_2 typedef typename GeomTraits::Cartesian_const_iterator_2
Cartesian_const_iterator_3; Cartesian_const_iterator_2;
typedef typename GeomTraits::Construct_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( AABB_traits_2(const Point &translation_point): m_translation_point(
translation_point) translation_point)
@ -214,6 +218,8 @@ private:
} }
}; };
} // namespace Minkowski_sum
} // namespace CGAL } // namespace CGAL
#endif #endif

View File

@ -277,7 +277,7 @@ private:
template<typename AABBTraits> template<typename AABBTraits>
class Do_intersect_joined_traits class Do_intersect_joined_traits
{ {
typedef typename AABBTraits::Point_3 Point; typedef typename AABBTraits::Point Point;
typedef typename AABBTraits::Primitive Primitive; typedef typename AABBTraits::Primitive Primitive;
typedef AABB_node_with_join<AABBTraits> Node; typedef AABB_node_with_join<AABBTraits> Node;

View File

@ -70,7 +70,7 @@ namespace CGAL {
/// Type of 3D point. /// Type of 3D point.
typedef typename AABBTraits::Point_3 Point; typedef typename AABBTraits::Point Point;
/// Type of input primitive. /// Type of input primitive.
typedef typename AABBTraits::Primitive Primitive; typedef typename AABBTraits::Primitive Primitive;