From 1d2d456d1780263ffce9f117296f8f762ec0f47d Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Wed, 28 May 2014 17:17:35 +0200 Subject: [PATCH] Typedefs for the weighted_point interfaces. --- .../CGAL/NewKernel_d/Kernel_d_interface.h | 13 +++++++++++ NewKernel_d/test/NewKernel_d/Epick_d.cpp | 22 +++++++++---------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h b/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h index af0438eb4a4..5d95346c1dc 100644 --- a/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h +++ b/NewKernel_d/include/CGAL/NewKernel_d/Kernel_d_interface.h @@ -54,6 +54,7 @@ template struct Kernel_d_interface : public Base_ { typedef typename Get_type::type Ray_d; typedef typename Get_type::type Iso_box_d; typedef typename Get_type::type Aff_transformation_d; + typedef typename Get_type::type Weighted_point_d; typedef typename Get_functor::type Compute_coordinate_d; typedef typename Get_functor::type Compare_lexicographically_d; typedef typename Get_functor::type Equal_d; @@ -64,10 +65,12 @@ template struct Kernel_d_interface : public Base_ { typedef typename Get_functor::type Less_coordinate_d; typedef typename Get_functor::type Point_dimension_d; typedef typename Get_functor::type Side_of_oriented_sphere_d; + typedef typename Get_functor::type Power_test_d; typedef typename Get_functor::type Contained_in_affine_hull_d; typedef typename Get_functor::type Construct_flat_orientation_d; typedef typename Get_functor::type In_flat_orientation_d; typedef typename Get_functor::type In_flat_side_of_oriented_sphere_d; + typedef typename Get_functor::type In_flat_power_test_d; typedef typename Get_functor::type Point_to_vector_d; typedef typename Get_functor::type Vector_to_point_d; typedef typename Get_functor >::type Construct_point_d; @@ -80,6 +83,7 @@ template struct Kernel_d_interface : public Base_ { typedef typename Get_functor >::type Construct_ray_d; typedef typename Get_functor >::type Construct_iso_box_d; typedef typename Get_functor >::type Construct_aff_transformation_d; + typedef typename Get_functor >::type Construct_weighted_point_d; typedef typename Get_functor::type Midpoint_d; struct Component_accessor_d : private Store_kernel { typedef Kernel R_; // for the macro @@ -145,6 +149,9 @@ template struct Kernel_d_interface : public Base_ { typedef typename Get_functor::type Orthogonal_vector_d; typedef typename Get_functor::type Linear_base_d; + typedef typename Get_functor::type Point_weight_d; + typedef typename Get_functor::type Point_drop_weight_d; + //TODO: //typedef ??? Intersect_d; @@ -161,6 +168,7 @@ template struct Kernel_d_interface : public Base_ { Point_dimension_d point_dimension_d_object()const{ return Point_dimension_d(*this); } Point_of_sphere_d point_of_sphere_d_object()const{ return Point_of_sphere_d(*this); } Side_of_oriented_sphere_d side_of_oriented_sphere_d_object()const{ return Side_of_oriented_sphere_d(*this); } + Power_test_d power_test_d_object()const{ return Power_test_d(*this); } Side_of_bounded_sphere_d side_of_bounded_sphere_d_object()const{ return Side_of_bounded_sphere_d(*this); } Contained_in_affine_hull_d contained_in_affine_hull_d_object()const{ return Contained_in_affine_hull_d(*this); } Contained_in_linear_hull_d contained_in_linear_hull_d_object()const{ return Contained_in_linear_hull_d(*this); } @@ -168,6 +176,7 @@ template struct Kernel_d_interface : public Base_ { 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); } + In_flat_power_test_d in_flat_power_test_d_object()const{ return In_flat_power_test_d(*this); } Point_to_vector_d point_to_vector_d_object()const{ return Point_to_vector_d(*this); } Vector_to_point_d vector_to_point_d_object()const{ return Vector_to_point_d(*this); } Affine_rank_d affine_rank_d_object()const{ return Affine_rank_d(*this); } @@ -193,6 +202,10 @@ template struct Kernel_d_interface : public Base_ { Construct_ray_d construct_ray_d_object()const{ return Construct_ray_d(*this); } Construct_iso_box_d construct_iso_box_d_object()const{ return Construct_iso_box_d(*this); } Construct_aff_transformation_d construct_aff_transformation_d_object()const{ return Construct_aff_transformation_d(*this); } + Construct_weighted_point_d construct_weighted_point_d_object()const{ return Construct_weighted_point_d(*this); } + + Point_weight_d point_weight_d_object()const{ return Point_weight_d(*this); } + Point_drop_weight_d point_drop_weight_d_object()const{ return Point_drop_weight_d(*this); } // Dummies for those required functors missing a concept. typedef Null_functor Position_on_line_d; diff --git a/NewKernel_d/test/NewKernel_d/Epick_d.cpp b/NewKernel_d/test/NewKernel_d/Epick_d.cpp index 9714a03e2a2..578e190dd80 100644 --- a/NewKernel_d/test/NewKernel_d/Epick_d.cpp +++ b/NewKernel_d/test/NewKernel_d/Epick_d.cpp @@ -516,17 +516,17 @@ void test3(){ assert(ifsos(fozp, tz+0, tz+3, tz[5]) == CGAL::ON_NEGATIVE_SIDE); assert(ifsos(fozn, tz+0, tz+3, tz[5]) == CGAL::ON_POSITIVE_SIDE); - typedef typename CGAL::Get_type::type WP; - typedef typename CGAL::Get_functor >::type CWP; - typedef typename CGAL::Get_functor::type PDW; - typedef typename CGAL::Get_functor::type PW; - typedef typename CGAL::Get_functor::type PT; - typedef typename CGAL::Get_functor::type IFPT; - CWP cwp (k); - PDW pdw (k); - PW pw (k); - PT pt (k); - IFPT ifpt (k); + typedef typename K1::Weighted_point_d WP; + typedef typename K1::Construct_weighted_point_d CWP; + typedef typename K1::Point_drop_weight_d PDW; + typedef typename K1::Point_weight_d PW; + typedef typename K1::Power_test_d PT; + typedef typename K1::In_flat_power_test_d IFPT; + CWP cwp Kinit(construct_weighted_point_d_object); + PDW pdw Kinit(point_drop_weight_d_object); + PW pw Kinit(point_weight_d_object); + PT pt Kinit(power_test_d_object); + IFPT ifpt Kinit(in_flat_power_test_d_object); WP wp = cwp (x1, 2); WP xw6 = cwp (x6, 0); assert (pw(wp) == 2);