From 68ecd6d45da5e5de528b7b72dfbd0008486129ac Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 14 Aug 2024 16:42:01 +0100 Subject: [PATCH] WIP for ConstructBbox (also on purpose CamelCase) --- .../NewKernel_d/function_objects_cartesian.h | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h index 1cfaaa4893b2..62aabe794017 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h @@ -1006,6 +1006,26 @@ template struct Squared_length : private Store_kernel { CGAL_KD_DEFAULT_FUNCTOR(Squared_length_tag,(CartesianDKernelFunctors::Squared_length),(Vector_tag),(Construct_ttag)); +namespace CartesianDKernelFunctors { +template struct ConstructBbox : private Store_kernel { + CGAL_FUNCTOR_INIT_STORE(ConstructBbox) + typedef R_ R; + typedef typename Get_type::type RT; + typedef typename Get_type::type Point; + typedef typename Get_functor >::type CI; + typedef Bbox result_type; + typedef Point argument_type; + result_type operator()(Point const&a)const{ + CI ci(this->kernel()); + To_interval f; + return result_type(DIM, make_transforming_iterator(ci(a,Begin_tag()),f), make_transforming_iterator(ci(a,End_tag())), f); + } +}; +} + +CGAL_KD_DEFAULT_FUNCTOR(ConstructBbox_tag,(CartesianDKernelFunctors::ConstructBbox),(Point_tag),(Construct_ttag)); + + namespace CartesianDKernelFunctors { template struct Squared_distance_to_origin : private Store_kernel { CGAL_FUNCTOR_INIT_STORE(Squared_distance_to_origin)