diff --git a/NewKernel_d/include/CGAL/Kernel_d/Cartesian_complete.h b/NewKernel_d/include/CGAL/Kernel_d/Cartesian_complete.h index 4f676effff5..25ff38b6ef9 100644 --- a/NewKernel_d/include/CGAL/Kernel_d/Cartesian_complete.h +++ b/NewKernel_d/include/CGAL/Kernel_d/Cartesian_complete.h @@ -76,6 +76,9 @@ template struct Cartesian_com template struct Cartesian_complete_predicates : public R_ { + // TODO: this doesn't look like the right place for this typedef... + typedef CartesianDKernelFunctors::Flat_orientation Flat_orientation; + typedef R_ Kernel_base; typedef typename Default::Get::type Derived; template::type> struct Functor : diff --git a/NewKernel_d/include/CGAL/Kernel_d/Coaffine.h b/NewKernel_d/include/CGAL/Kernel_d/Coaffine.h index c0f1918dd6f..b7da88507c0 100644 --- a/NewKernel_d/include/CGAL/Kernel_d/Coaffine.h +++ b/NewKernel_d/include/CGAL/Kernel_d/Coaffine.h @@ -3,6 +3,7 @@ #include #include #include +#include #include namespace CGAL { @@ -20,7 +21,7 @@ template struct Construct_flat_orientation : private Store_kernel typedef typename R::template Functor::type CCC; typedef typename R::LA LA; typedef typename Increment_dimension::type Dplusone; - typedef typename LA::template Matrix::type Matrix; + typedef typename LA::template Matrix::type Matrix; typedef typename R::template Functor::type PD; typedef Flat_orientation result_type; @@ -60,7 +61,7 @@ template struct Construct_flat_orientation : private Store_kernel } //CGAL_assertion(it!=rest.end()); } - std::sort(proj.begin(),proj.last()); + std::sort(proj.begin(),proj.end()); return o; } }; @@ -69,13 +70,14 @@ template struct Contained_in_affine_hull : private Store_kernel { CGAL_FUNCTOR_INIT_STORE(Contained_in_affine_hull) typedef R_ R; typedef typename R_::FT FT; + typedef typename R::LA LA; typedef typename R::template Type::type Point; typedef typename R::Orientation result_type; typedef typename R::template Functor::type CCC; typedef typename R::template Functor::type PD; typedef typename Increment_dimension::type D1; typedef typename Increment_dimension::type D2; - typedef typename R::LA::template Matrix::type Matrix; + typedef typename LA::template Matrix::type Matrix; // mostly copied from Construct_flat_orientation. TODO: dedup this code. template diff --git a/NewKernel_d/include/CGAL/Kernel_d/Kernel_d_interface.h b/NewKernel_d/include/CGAL/Kernel_d/Kernel_d_interface.h new file mode 100644 index 00000000000..2466a0a3558 --- /dev/null +++ b/NewKernel_d/include/CGAL/Kernel_d/Kernel_d_interface.h @@ -0,0 +1,37 @@ +#ifndef CGAL_KD_KERNEL_3_INTERFACE_H +#define CGAL_KD_KERNEL_3_INTERFACE_H + +#include +#include +#include +#include + + +namespace CGAL { +template struct Kernel_d_interface : public Base_ { + typedef Base_ Base; + typedef Kernel_d_interface Kernel; + typedef typename Base::Flat_orientation Flat_orientation_d; + typedef typename Base::template Type::type Point_d; + typedef typename Base::template Type::type Vector_d; + //typedef typename Base::template Type::type Segment_d; + typedef typename Base::template Functor::type Compare_lexicographically_d; + typedef typename Base::template Functor::type Orientation_d; + typedef typename Base::template Functor::type Side_of_oriented_sphere_d; + typedef typename Base::template Functor::type Contained_in_affine_hull_d; + typedef typename Base::template Functor::type Construct_flat_orientation_d; + typedef typename Base::template Functor::type In_flat_orientation_d; + typedef typename Base::template Functor::type In_flat_side_of_oriented_sphere_d; + + + Compare_lexicographically_d compare_lexicographically_d_object()const{ return Compare_lexicographically_d(*this); } + Orientation_d orientation_d_object()const{ return Orientation_d(*this); } + Side_of_oriented_sphere_d side_of_oriented_sphere_d_object()const{ return Side_of_oriented_sphere_d(*this); } + Contained_in_affine_hull_d contained_in_affine_hull_d_object()const{ return Contained_in_affine_hull_d(*this); } + Construct_flat_orientation_d construct_flat_orientation_d_object()const{ return Construct_flat_orientation_d(*this); } + In_flat_orientation_d in_flat_orientation_d_object()const{ return In_flat_orientation_d(*this); } + In_flat_side_of_oriented_sphere_d in_flat_side_of_oriented_sphere_d_object()const{ return In_flat_side_of_oriented_sphere_d(*this); } +}; +} + +#endif diff --git a/NewKernel_d/include/CGAL/Kernel_d/function_objects_cartesian.h b/NewKernel_d/include/CGAL/Kernel_d/function_objects_cartesian.h index c6ecf2a7752..7579ae208c0 100644 --- a/NewKernel_d/include/CGAL/Kernel_d/function_objects_cartesian.h +++ b/NewKernel_d/include/CGAL/Kernel_d/function_objects_cartesian.h @@ -490,4 +490,5 @@ template struct Compare_lexicographically : private Store_kernel { } } +#include #endif // CGAL_KERNEL_D_FUNCTION_OBJECTS_CARTESIAN_H diff --git a/NewKernel_d/include/CGAL/Kernel_d/interface_macros.h b/NewKernel_d/include/CGAL/Kernel_d/interface_macros.h index 286648bb016..98a089183cb 100644 --- a/NewKernel_d/include/CGAL/Kernel_d/interface_macros.h +++ b/NewKernel_d/include/CGAL/Kernel_d/interface_macros.h @@ -78,6 +78,14 @@ CGAL_Kernel_pred(Compare_distance, compare_distance_object) CGAL_Kernel_pred(Compare_lexicographically, compare_lexicographically_object) +CGAL_Kernel_pred(Contained_in_affine_hull, + contained_in_affine_hull_object) +CGAL_Kernel_pred(In_flat_orientation, + in_flat_orientation_object) +CGAL_Kernel_pred(In_flat_side_of_oriented_sphere, + in_flat_side_of_oriented_sphere_object) +CGAL_Kernel_pred(Construct_flat_orientation, + construct_flat_orientation_object) #undef CGAL_Kernel_pred #undef CGAL_Kernel_comp