diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index 539ebbff948..82d6ff20f58 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -874,7 +874,7 @@ struct Lazy_construction_bbox template -struct Lazy_construction_optional +struct Lazy_construction_optional_for_polygonal_envelope { static const bool Protection = true; typedef typename LK::Approximate_kernel AK; diff --git a/Filtered_kernel/include/CGAL/Lazy_kernel.h b/Filtered_kernel/include/CGAL/Lazy_kernel.h index 71edc17eff7..89a84b5f150 100644 --- a/Filtered_kernel/include/CGAL/Lazy_kernel.h +++ b/Filtered_kernel/include/CGAL/Lazy_kernel.h @@ -178,7 +178,7 @@ private: // The case distinction goes as follows: // result_type == FT => NT // result_type == Object => Object - // result_type == boost::optional => OPTIONAL_ + // result_type == boost::optional => OPTIONAL_ Only for Intersect_point_3_for_polyhedral_envelope which returns a handle for a singleton // result_type == Bbox_2 || result_type == Bbox_3 => BBOX // default => NONE // no result_type => NONE @@ -214,7 +214,7 @@ private: CGAL_WRAPPER_TRAIT(Intersect_2, VARIANT) CGAL_WRAPPER_TRAIT(Intersect_3, VARIANT) - CGAL_WRAPPER_TRAIT(Intersect_point_3, OPTIONAL_) + CGAL_WRAPPER_TRAIT(Intersect_point_3_for_polyhedral_envelope, OPTIONAL_) CGAL_WRAPPER_TRAIT(Compute_squared_radius_2, NT) CGAL_WRAPPER_TRAIT(Compute_x_3, NT) CGAL_WRAPPER_TRAIT(Compute_y_3, NT) @@ -258,7 +258,7 @@ private: template struct Select_wrapper_impl { template - struct apply { typedef Lazy_construction_optional type; }; + struct apply { typedef Lazy_construction_optional_for_polygonal_envelope type; }; }; template diff --git a/Intersections_3/include/CGAL/Intersections_3/Line_3_Plane_3.h b/Intersections_3/include/CGAL/Intersections_3/Line_3_Plane_3.h index 5dc93e65edd..49f64fa5fca 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Line_3_Plane_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Line_3_Plane_3.h @@ -26,17 +26,17 @@ CGAL_DO_INTERSECT_FUNCTION(Plane_3, Line_3, 3) template < class K > inline boost::optional -intersection_point(const Plane_3& plane, const Line_3& line) +intersection_point_for_polyhedral_envelope(const Plane_3& plane, const Line_3& line) { - return K().intersect_point_3_object()(plane, line); + return K().intersect_point_3_for_polyhedral_envelope_object()(plane, line); } template < class K > inline boost::optional - intersection_point(const Line_3& line, const Plane_3& plane) + intersection_point_for_polyhedral_envelope(const Line_3& line, const Plane_3& plane) { - return K().intersect_point_3_object()(plane, line); + return K().intersect_point_3_for_polyhedral_envelope_object()(plane, line); } } diff --git a/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3.h b/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3.h index 5f3a176056c..7f82f23b740 100644 --- a/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3.h +++ b/Intersections_3/include/CGAL/Intersections_3/Plane_3_Plane_3.h @@ -26,9 +26,9 @@ CGAL_DO_INTERSECT_FUNCTION_SELF(Plane_3, 3) template < class K > inline boost::optional -intersection_point(const Plane_3& p0, const Plane_3& p1, const Plane_3& p2) +intersection_point_for_polyhedral_envelope(const Plane_3& p0, const Plane_3& p1, const Plane_3& p2) { - return K().intersect_point_3_object()(p0, p1, p2); + return K().intersect_point_3_for_polyhedral_envelope_object()(p0, p1, p2); } } diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index b462f6ef001..eaf86e7fa33 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -3568,8 +3568,12 @@ namespace CommonKernelFunctors { }; + // This functor is not part of the documented Kernel API, but an implementation detail + // of Polygon_mesh_processing::Polyhedral_envelope + // When used with the Lazy_kernel (that is Epeck) the returned point + // is a singleton (so its coordinates will be changed by another call). template - class Intersect_point_3 + class Intersect_point_3_for_polyhedral_envelope { public: typedef typename K::Point_3 Point_3; diff --git a/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Kernel_23/include/CGAL/Kernel/interface_macros.h index 43f5ff7a2f7..a4caf77e7be 100644 --- a/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -542,8 +542,8 @@ CGAL_Kernel_cons(Intersect_2, intersect_2_object) CGAL_Kernel_cons(Intersect_3, intersect_3_object) -CGAL_Kernel_cons(Intersect_point_3, - intersect_point_3_object) +CGAL_Kernel_cons(Intersect_point_3_for_polyhedral_envelope, + intersect_point_3_for_polyhedral_envelope_object) CGAL_Kernel_pred(Is_degenerate_2, is_degenerate_2_object) CGAL_Kernel_pred_RT(Is_degenerate_3, diff --git a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h index 53c16127926..b1d76c12950 100644 --- a/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h +++ b/Polygon_mesh_processing/include/CGAL/Polyhedral_envelope.h @@ -729,7 +729,7 @@ private: for (unsigned int i = 0; i < cutp.size(); i++){ const Plane& plane_i = prism[cutp[i]]; - boost::optional op = intersection_point(line, plane_i.eplane); + boost::optional op = intersection_point_for_polyhedral_envelope(line, plane_i.eplane); if(! op){ std::cout << "there must be an intersection 2" << std::endl; } @@ -850,8 +850,8 @@ private: } for (unsigned int j = 0; j < cidl.size(); j++) { - boost::optional op = intersection_point(line, - halfspace[prismindex[queue[i]]][cidl[j]].eplane); + boost::optional op = intersection_point_for_polyhedral_envelope(line, + halfspace[prismindex[queue[i]]][cidl[j]].eplane); const ePoint_3& ip = *op; inter = Implicit_Seg_Facet_interpoint_Out_Prism_return_local_id (ip, idlist, jump1, check_id); @@ -1034,7 +1034,7 @@ private: const Plane& plane_i = prism[cutp[i]]; const eLine_3& eline = *(seg[k]); - boost::optional op = intersection_point(eline, plane_i.eplane); + boost::optional op = intersection_point_for_polyhedral_envelope(eline, plane_i.eplane); if(! op){ #ifdef CGAL_ENVELOPE_DEBUG std::cout << "there must be an intersection 6" << std::endl; @@ -1088,7 +1088,7 @@ private: int inter = 0; - boost::optional ipp = intersection_point(tri_eplane, prism[cutp[i]].eplane, prism[cutp[j]].eplane); + boost::optional ipp = intersection_point_for_polyhedral_envelope(tri_eplane, prism[cutp[i]].eplane, prism[cutp[j]].eplane); if(ipp){ inter = is_3_triangle_cut_float_fast(tri0, tri1, tri2, n, @@ -1528,8 +1528,8 @@ private: if (!cut) continue; for (unsigned int j = 0; j < cidl.size(); j++) { - boost::optional op = intersection_point(eline, - halfspace[prismindex[queue[i]]][cidl[j]].eplane); + boost::optional op = intersection_point_for_polyhedral_envelope(eline, + halfspace[prismindex[queue[i]]][cidl[j]].eplane); const ePoint_3& ip = *op; inter = Implicit_Seg_Facet_interpoint_Out_Prism_return_local_id(ip, idlist, jump1, check_id); @@ -1612,8 +1612,8 @@ private: } // now we know that there exists an intesection point - boost::optional op = intersection_point(eline, - halfspace[filtered_intersection[queue[i]]][intersect_face[queue[i]][j]].eplane); + boost::optional op = intersection_point_for_polyhedral_envelope(eline, + halfspace[filtered_intersection[queue[i]]][intersect_face[queue[i]][j]].eplane); const ePoint_3& ip = *op; inter = Implicit_Seg_Facet_interpoint_Out_Prism_return_local_id_with_face_order(ip, idlist, idlistorder, jump1, check_id); @@ -1696,9 +1696,9 @@ private: // We moved the intersection here // In case there is no intersection point we continue boost::optional - op = intersection_point(etriangle_eplane, - halfspace[jump1][intersect_face[queue[i]][k]].eplane, - halfspace[jump2][intersect_face[queue[j]][h]].eplane); + op = intersection_point_for_polyhedral_envelope(etriangle_eplane, + halfspace[jump1][intersect_face[queue[i]][k]].eplane, + halfspace[jump2][intersect_face[queue[j]][h]].eplane); if(! op){ continue; }