Skip to content

Commit

Permalink
WIP for ConstructBbox (also on purpose CamelCase)
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Aug 14, 2024
1 parent 0cc387e commit 68ecd6d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions NewKernel_d/include/CGAL/NewKernel_d/function_objects_cartesian.h
Original file line number Diff line number Diff line change
Expand Up @@ -1006,6 +1006,26 @@ template<class R_> struct Squared_length : private Store_kernel<R_> {

CGAL_KD_DEFAULT_FUNCTOR(Squared_length_tag,(CartesianDKernelFunctors::Squared_length<K>),(Vector_tag),(Construct_ttag<Vector_cartesian_const_iterator_tag>));

namespace CartesianDKernelFunctors {
template<class R_> struct ConstructBbox : private Store_kernel<R_> {
CGAL_FUNCTOR_INIT_STORE(ConstructBbox)
typedef R_ R;
typedef typename Get_type<R, RT_tag>::type RT;
typedef typename Get_type<R, Point_tag>::type Point;
typedef typename Get_functor<R, Construct_ttag<Point_cartesian_const_iterator_tag> >::type CI;
typedef Bbox<DIM,double> 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<K>),(Point_tag),(Construct_ttag<Point_cartesian_const_iterator_tag>));


namespace CartesianDKernelFunctors {
template<class R_> struct Squared_distance_to_origin : private Store_kernel<R_> {
CGAL_FUNCTOR_INIT_STORE(Squared_distance_to_origin)
Expand Down

0 comments on commit 68ecd6d

Please sign in to comment.