diff --git a/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h b/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h index 6d4c7f20fe3..1ba7a2962ff 100644 --- a/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h +++ b/Alpha_shapes_3/include/CGAL/internal/Lazy_alpha_nt_3.h @@ -22,6 +22,8 @@ #define CGAL_INTERNAL_LAZY_ALPHA_NT_3_H #include +#include +#include #include #include #include @@ -55,8 +57,8 @@ template { //Converter types - typedef CGAL::Weighted_converter_3< CGAL::Cartesian_converter > To_approx; - typedef CGAL::Weighted_converter_3< CGAL::Cartesian_converter > To_exact; + typedef CGAL::Cartesian_converter To_approx; + typedef CGAL::Cartesian_converter To_exact; //Traits types typedef ::CGAL::Regular_triangulation_euclidean_traits_3 Approx_traits; typedef ::CGAL::Regular_triangulation_euclidean_traits_3 Exact_traits; diff --git a/Alpha_shapes_3/test/Alpha_shapes_3/bench_walpha.cpp b/Alpha_shapes_3/test/Alpha_shapes_3/bench_walpha.cpp index 0f0b8fd17f2..9f49cdec3a9 100644 --- a/Alpha_shapes_3/test/Alpha_shapes_3/bench_walpha.cpp +++ b/Alpha_shapes_3/test/Alpha_shapes_3/bench_walpha.cpp @@ -20,7 +20,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Regular_triangulation_euclidean_traits_3 EPIC_traits; -typedef CGAL::Weighted_point Weighted_point; +typedef CGAL::Weighted_point_3 Weighted_point; typedef CGAL::Fixed_alpha_shape_vertex_base_3 WFixed_Vb; typedef CGAL::Fixed_alpha_shape_cell_base_3 WFixed_Cb; typedef CGAL::Triangulation_data_structure_3 WFixed_TDS; diff --git a/Alpha_shapes_3/test/Alpha_shapes_3/test_fixed_alpha_shape_3.cpp b/Alpha_shapes_3/test/Alpha_shapes_3/test_fixed_alpha_shape_3.cpp index 12a0de8e7dc..f7e303e2c25 100644 --- a/Alpha_shapes_3/test/Alpha_shapes_3/test_fixed_alpha_shape_3.cpp +++ b/Alpha_shapes_3/test/Alpha_shapes_3/test_fixed_alpha_shape_3.cpp @@ -24,7 +24,7 @@ typedef WFixed_Gt //typedef CGAL::Filtered_weighted_alpha_shape_euclidean_traits_3 Gt; -typedef CGAL::Weighted_point Weighted_point; +typedef CGAL::Weighted_point_3 Weighted_point; typedef CGAL::Fixed_alpha_shape_vertex_base_3 WFixed_Vb; typedef CGAL::Fixed_alpha_shape_cell_base_3 WFixed_Cb; typedef CGAL::Triangulation_data_structure_3 WFixed_TDS; diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index f283e7055ba..0735157ece4 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -3130,11 +3130,12 @@ namespace HomogeneousKernelFunctors { template class Construct_weighted_point_3 { - typedef typename K::RT RT; - typedef typename K::Point_3 Point_3; - typedef typename Point_3::Rep Rep; + typedef typename K::RT RT; + typedef typename K::Point_3 Point_3; + typedef typename K::Weighted_point_3 Weighted_point_3; + typedef typename Point_3::Rep Rep; public: - typedef Weighted_point_3 result_type; + typedef Weighted_point_3 result_type; Rep operator()(Return_base_tag, const Point_3& p, const RT& w) const diff --git a/Kernel_23/include/CGAL/Weighted_point_3.h b/Kernel_23/include/CGAL/Weighted_point_3.h index 7b06c80c24a..275beeedcdb 100644 --- a/Kernel_23/include/CGAL/Weighted_point_3.h +++ b/Kernel_23/include/CGAL/Weighted_point_3.h @@ -54,6 +54,8 @@ public: typedef typename R_::Vector_3 Vector_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3; + typedef Point_3 Point; + typedef RT Weight; const Rep& rep() const { diff --git a/Skin_surface_3/examples/Skin_surface_3/include/extract_balls_from_pdb.h b/Skin_surface_3/examples/Skin_surface_3/include/extract_balls_from_pdb.h index e45a7a519b0..d4a423f31b2 100644 --- a/Skin_surface_3/examples/Skin_surface_3/include/extract_balls_from_pdb.h +++ b/Skin_surface_3/examples/Skin_surface_3/include/extract_balls_from_pdb.h @@ -14,7 +14,7 @@ void extract_balls_from_pdb(const char *filename, typedef ESBTL::Generic_classifier > T_Atom_classifier; typedef ESBTL::Accept_none_occupancy_policy > Accept_none_occupancy_policy; typedef ESBTL::Weighted_atom_iterator, + typename K::Weighted_point_3, ESBTL::Weight_of_atoms > Weighted_atom_iterator; ESBTL::PDB_line_selector sel; diff --git a/Skin_surface_3/examples/Skin_surface_3/skin_surface_simple.cpp b/Skin_surface_3/examples/Skin_surface_3/skin_surface_simple.cpp index 32996bcd2aa..d62f7fcb710 100644 --- a/Skin_surface_3/examples/Skin_surface_3/skin_surface_simple.cpp +++ b/Skin_surface_3/examples/Skin_surface_3/skin_surface_simple.cpp @@ -4,7 +4,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef K::Point_3 Bare_point; -typedef CGAL::Weighted_point Weighted_point; +typedef K::Weighted_point_3 Weighted_point; typedef CGAL::Polyhedron_3 Polyhedron; int main() { diff --git a/Skin_surface_3/include/CGAL/Skin_surface_base_3.h b/Skin_surface_3/include/CGAL/Skin_surface_base_3.h index 1ad01b0871d..cf8cca35786 100644 --- a/Skin_surface_3/include/CGAL/Skin_surface_base_3.h +++ b/Skin_surface_3/include/CGAL/Skin_surface_base_3.h @@ -569,11 +569,11 @@ Skin_surface_quadratic_surface_3 Skin_surface_base_3:: construct_surface(const Simplex &sim, const Traits &) const { typedef Skin_surface_quadratic_surface_3 Quadratic_surface; - typedef Weighted_converter_3 > Converter; + typedef Cartesian_converter< + typename Geometric_traits::Bare_point::R, Traits> Converter; typedef typename Traits::Point_3 Point; typedef typename Traits::FT FT; - typedef CGAL::Weighted_point Weighted_point; + typedef typename Traits::Weighted_point_3 Weighted_point; Converter conv; @@ -756,9 +756,8 @@ get_weighted_circumcenter(const Simplex &s, Gt2 &traits) { Facet f; Cell_handle ch; - Weighted_converter_3< Cartesian_converter > converter; + typename Gt2::Bare_point::R> converter; typename Gt2::Bare_point result; switch(s.dimension()) { diff --git a/Skin_surface_3/include/CGAL/Skin_surface_filtered_traits_3.h b/Skin_surface_3/include/CGAL/Skin_surface_filtered_traits_3.h index 2d5a17deef1..b89cc515d8f 100644 --- a/Skin_surface_3/include/CGAL/Skin_surface_filtered_traits_3.h +++ b/Skin_surface_3/include/CGAL/Skin_surface_filtered_traits_3.h @@ -49,8 +49,8 @@ public: typedef Filtered_predicate< typename Exact_traits::Side_of_mixed_cell_3, typename Filtering_traits::Side_of_mixed_cell_3, - Weighted_converter_3, - Weighted_converter_3 > Side_of_mixed_cell_3; + C2E, + C2F > Side_of_mixed_cell_3; enum { Has_filtered_predicates=true }; enum { Has_static_filters=false }; diff --git a/Skin_surface_3/include/CGAL/Skin_surface_quadratic_surface_3.h b/Skin_surface_3/include/CGAL/Skin_surface_quadratic_surface_3.h index 08705faa3f6..3ab1cf8d4b7 100644 --- a/Skin_surface_3/include/CGAL/Skin_surface_quadratic_surface_3.h +++ b/Skin_surface_3/include/CGAL/Skin_surface_quadratic_surface_3.h @@ -33,7 +33,7 @@ public: typedef typename K::Point_3 Point; typedef typename K::Vector_3 Vector; typedef typename K::Segment_3 Segment; - typedef CGAL::Weighted_point Weighted_point; + typedef typename K::Weighted_point_3 Weighted_point; Skin_surface_quadratic_surface_3() : dim(-1), p(0,0,0), c(0) @@ -63,7 +63,7 @@ public: Regular_triangulation_euclidean_traits_3 reg_traits; p = reg_traits.construct_weighted_circumcenter_3_object()(wp0,wp1); c = s*(1-s)*reg_traits.compute_squared_radius_smallest_orthogonal_sphere_3_object()(wp0,wp1); - Vector t = wp0-wp1; + Vector t = reg_traits.construct_vector_3_object()(wp1,wp0); FT den = t*t; Q[0] = (- t.x()*t.x()/den + (1-s)); diff --git a/Skin_surface_3/include/CGAL/Skin_surface_traits_3.h b/Skin_surface_3/include/CGAL/Skin_surface_traits_3.h index 4dd3dfc4a0c..a236a011598 100644 --- a/Skin_surface_3/include/CGAL/Skin_surface_traits_3.h +++ b/Skin_surface_3/include/CGAL/Skin_surface_traits_3.h @@ -118,7 +118,7 @@ public: typedef Weighted_point Weighted_point_3; typedef CGAL::Side_of_mixed_cell_3 Side_of_mixed_cell_3; - typedef CGAL::Construct_weighted_circumcenter_3 + typedef typename Kernel::Construct_weighted_circumcenter_3 Construct_weighted_circumcenter_3; typedef CGAL::Construct_anchor_point_3 Construct_anchor_point_3; diff --git a/Skin_surface_3/include/CGAL/Triangulated_mixed_complex_observer_3.h b/Skin_surface_3/include/CGAL/Triangulated_mixed_complex_observer_3.h index 1b57eadc474..6a1407c081b 100644 --- a/Skin_surface_3/include/CGAL/Triangulated_mixed_complex_observer_3.h +++ b/Skin_surface_3/include/CGAL/Triangulated_mixed_complex_observer_3.h @@ -72,11 +72,11 @@ public: typedef Regular_triangulation_euclidean_traits_3 Surface_regular_traits; typedef typename Quadratic_surface::Point Surface_point; typedef typename Quadratic_surface::Vector Surface_vector; - typedef Weighted_point Surface_weighted_point; + typedef typename Surface_traits::Weighted_point_3 Surface_weighted_point; - typedef Weighted_converter_3< + typedef Cartesian_converter < typename Regular_traits::Bare_point::R, - typename Quadratic_surface::K > > R2S_converter; + typename Quadratic_surface::K > R2S_converter; Triangulated_mixed_complex_observer_3(FT shrink) : shrink(shrink) {} diff --git a/Skin_surface_3/include/CGAL/triangulate_mixed_complex_3.h b/Skin_surface_3/include/CGAL/triangulate_mixed_complex_3.h index 1056c99c1b1..6dd125c1cf3 100644 --- a/Skin_surface_3/include/CGAL/triangulate_mixed_complex_3.h +++ b/Skin_surface_3/include/CGAL/triangulate_mixed_complex_3.h @@ -253,22 +253,17 @@ private: Triangulation_incremental_builder triangulation_incr_builder; - Construct_weighted_circumcenter_3< - Regular_triangulation_euclidean_traits_3< - Triangulated_mixed_complex_traits> > weighted_circumcenter_obj; + typename Tmc_traits::Construct_weighted_circumcenter_3 weighted_circumcenter_obj; - Weighted_converter_3< - Cartesian_converter > + Cartesian_converter r2t_converter_object; Construct_anchor_point_3< Regular_triangulation_euclidean_traits_3< Triangulated_mixed_complex_traits> > construct_anchor_point_3_obj; - Compute_squared_radius_smallest_orthogonal_sphere_3< - Regular_triangulation_euclidean_traits_3< - Triangulated_mixed_complex_traits> > orthoweight_obj; + typename Tmc_traits::Compute_squared_radius_smallest_orthogonal_sphere_3 orthoweight_obj; Compute_anchor_3 compute_anchor_obj; bool verbose; diff --git a/Skin_surface_3/include/CGAL/triangulate_power_diagram_3.h b/Skin_surface_3/include/CGAL/triangulate_power_diagram_3.h index 215b7f04648..e00030ed584 100644 --- a/Skin_surface_3/include/CGAL/triangulate_power_diagram_3.h +++ b/Skin_surface_3/include/CGAL/triangulate_power_diagram_3.h @@ -200,19 +200,14 @@ private: Triangulation_incremental_builder triangulation_incr_builder; - Construct_weighted_circumcenter_3< - Regular_triangulation_euclidean_traits_3< - Triangulated_mixed_complex_traits> > orthocenter_obj; + typename Tmc_traits::Construct_weighted_circumcenter_3 orthocenter_obj; - Compute_squared_radius_smallest_orthogonal_sphere_3< - Regular_triangulation_euclidean_traits_3< - Triangulated_mixed_complex_traits> > orthoweight_obj; + typename Tmc_traits::Compute_squared_radius_smallest_orthogonal_sphere_3 orthoweight_obj; Compute_anchor_3 compute_anchor_obj; bool verbose; - Weighted_converter_3< Cartesian_converter > + Triangulated_mixed_complex_traits > r2t_converter_object; diff --git a/Skin_surface_3/test/Skin_surface_3/union_of_balls_test.cpp b/Skin_surface_3/test/Skin_surface_3/union_of_balls_test.cpp index bd86e700e5c..54887875a2c 100644 --- a/Skin_surface_3/test/Skin_surface_3/union_of_balls_test.cpp +++ b/Skin_surface_3/test/Skin_surface_3/union_of_balls_test.cpp @@ -15,7 +15,7 @@ int main(int, char *[]) { {5.46575, 3.92853, 0.183865}}; typedef CGAL::Exact_predicates_inexact_constructions_kernel IKernel; typedef IKernel::Point_3 Bare_point; - typedef CGAL::Weighted_point Weighted_point; + typedef IKernel::Weighted_point_3 Weighted_point; size_t size=sizeof(pts)/(3*sizeof(double)); std::vector l(size); for (size_t i=0; i< size; ++i) { diff --git a/Skin_surface_3/test/Skin_surface_3/union_of_balls_test_exact.cpp b/Skin_surface_3/test/Skin_surface_3/union_of_balls_test_exact.cpp index f047a2cb8f0..e1b726f7e6b 100644 --- a/Skin_surface_3/test/Skin_surface_3/union_of_balls_test_exact.cpp +++ b/Skin_surface_3/test/Skin_surface_3/union_of_balls_test_exact.cpp @@ -15,7 +15,7 @@ int main(int, char *[]) { {5.46575, 3.92853, 0.183865}}; typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; typedef Kernel::Point_3 Bare_point; - typedef CGAL::Weighted_point Weighted_point; + typedef Kernel::Weighted_point_3 Weighted_point; size_t size=sizeof(pts)/(3*sizeof(double)); std::vector l(size); for (size_t i=0; i< size; ++i) { diff --git a/Surface_mesher/include/CGAL/Robust_circumcenter_traits_3.h b/Surface_mesher/include/CGAL/Robust_circumcenter_traits_3.h index 2638b5bd7fd..e74c46fea45 100644 --- a/Surface_mesher/include/CGAL/Robust_circumcenter_traits_3.h +++ b/Surface_mesher/include/CGAL/Robust_circumcenter_traits_3.h @@ -47,8 +47,8 @@ public: typedef Bare_point result_type; - typedef Weighted_converter_3 > To_exact; - typedef Weighted_converter_3 > Back_from_exact; + typedef Cartesian_converter To_exact; + typedef Cartesian_converter Back_from_exact; Bare_point operator() ( const Weighted_point_3 & p,