From aa3feae736b83821efc48ba5439d2b97905ce38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 9 Jan 2015 12:27:23 +0100 Subject: [PATCH] Remove no longer needed predicates/constructions follow up of 90ee311ba9b5643308ea8277f4cc0bc502f3f29c --- .../dual/Convex_hull_traits_dual_3.h | 47 +----------- .../CGAL/Convex_hull_3/dual/predicates.h | 71 ------------------- 2 files changed, 1 insertion(+), 117 deletions(-) diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h index a5fdb6216f2..963124fcc57 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/Convex_hull_traits_dual_3.h @@ -61,7 +61,6 @@ namespace CGAL typedef Plane_dual Plane_3; typedef Segment_dual Segment_3; typedef Plane_dual Triangle_3; - typedef Vector_dual Vector_3; // Traits used by convex_hull_2 typedef typename CGAL::Convex_hull_3::Traits_xy_dual Traits_xy_3; @@ -89,26 +88,6 @@ namespace CGAL } }; - // Vector_3 - class Construct_vector_3 { - public: - Vector_3 operator ()(const Point_3& p, - const Point_3& q) - { - return Vector_3(p, q); - } - - Vector_3 operator ()(int x, - int y, - int z) - { - Point_3 p(0, 0, 0, -1); - Point_3 q(x, y, z, -1); - - return Vector_3(p, q); - } - }; - // Plane_3 class Construct_plane_3 { public: @@ -127,7 +106,6 @@ namespace CGAL typedef Has_on_positive_side_3_dual_point Has_on_positive_side_3; typedef Less_distance_to_point_3_dual_point Less_distance_to_point_3; typedef Less_signed_distance_to_plane_3_dual_point Less_signed_distance_to_plane_3; - typedef Orientation_3_dual_point Orientation_3; Construct_segment_3 construct_segment_3_object() const @@ -141,10 +119,6 @@ namespace CGAL construct_triangle_3_object() const { return Construct_triangle_3(); } - Construct_vector_3 - construct_vector_3_object() const - { return Construct_vector_3(); } - Collinear_3 collinear_3_object() const { return Collinear_3(origin); } @@ -169,9 +143,6 @@ namespace CGAL less_signed_distance_to_plane_3_object() const { return Less_signed_distance_to_plane_3(origin); } - Orientation_3 - orientation_3_object() const - { return Orientation_3(origin); } }; // Non-filtered traits class @@ -188,7 +159,7 @@ namespace CGAL {} } ; - // Converter for dual planes and dual vectors + // Converter for dual planes template struct Cartesian_converter_dual : public Cartesian_converter { @@ -200,12 +171,6 @@ namespace CGAL operator()(in.p2), operator()(in.p3)); } - - Vector_dual operator() (const Vector_dual &in) const - { - return Vector_dual(operator()(in.p), - operator()(in.q)); - } }; // Filtered traits @@ -274,12 +239,6 @@ namespace CGAL Converter_exact_dual, Converter_approx_dual > Less_signed_distance_to_plane_3; - typedef Filtered_predicate< - typename Exact_traits::Orientation_3, - typename Filtering_traits::Orientation_3, - Converter_exact_dual, - Converter_approx_dual > Orientation_3; - Collinear_3 collinear_3_object() const { return Collinear_3(origin); } @@ -299,10 +258,6 @@ namespace CGAL less_signed_distance_to_plane_3_object() const { return Less_signed_distance_to_plane_3(origin); } - Orientation_3 - orientation_3_object() const - { return Orientation_3(origin); } - // Constructions are inherited }; diff --git a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/predicates.h b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/predicates.h index 2410611a19a..6879af58b84 100644 --- a/Convex_hull_3/include/CGAL/Convex_hull_3/dual/predicates.h +++ b/Convex_hull_3/include/CGAL/Convex_hull_3/dual/predicates.h @@ -67,19 +67,6 @@ namespace CGAL {} }; - // Vector in the dual space : 2 dual points = 2 planes - template - struct Vector_dual - { - typedef typename K::Plane_3 Plane_3; - - Plane_3 p; - Plane_3 q; - - Vector_dual (Plane_3 p, Plane_3 q) : p(p), q(q) - {} - }; - // Predicates for dual points // Equal template < typename K > @@ -463,64 +450,6 @@ namespace CGAL Point_3 origin; }; - // Orientation - template < typename K > - struct Orientation_3_dual_point - { - typedef typename K::RT RT; - typedef typename K::Plane_3 Plane_3; - typedef typename K::Point_3 Point_3; - typedef typename CGAL::Orientation result_type; - - Orientation_3_dual_point (Point_3 const& o = Point_3(0, 0, 0)) : - origin(o) - {} - - result_type - operator()(Vector_dual const& v1, - Vector_dual const& v2, - Vector_dual const& v3) const - { - Plane_3 p1 = v1.p; - Plane_3 q1 = v1.q; - Plane_3 p2 = v2.p; - Plane_3 q2 = v2.q; - Plane_3 p3 = v3.p; - Plane_3 q3 = v3.q; - - RT dp1 = p1.d() + origin.x() * p1.a() - + origin.y() * p1.b() + origin.z() * p1.c(); - RT dp2 = p2.d() + origin.x() * p2.a() - + origin.y() * p2.b() + origin.z() * p2.c(); - RT dp3 = p3.d() + origin.x() * p3.a() - + origin.y() * p3.b() + origin.z() * p3.c(); - RT dq1 = q1.d() + origin.x() * q1.a() - + origin.y() * q1.b() + origin.z() * q1.c(); - RT dq2 = q2.d() + origin.x() * q2.a() - + origin.y() * q2.b() + origin.z() * q2.c(); - RT dq3 = q3.d() + origin.x() * q3.a() - + origin.y() * q3.b() + origin.z() * q3.c(); - - RT diff1a = p1.a() * dq1 - q1.a() * dp1; - RT diff1b = p1.b() * dq1 - q1.b() * dp1; - RT diff1c = p1.c() * dq1 - q1.c() * dp1; - - RT diff2a = p2.a() * dq2 - q2.a() * dp2; - RT diff2b = p2.b() * dq2 - q2.b() * dp2; - RT diff2c = p2.c() * dq2 - q2.c() * dp2; - - RT diff3a = p3.a() * dq3 - q3.a() * dp3; - RT diff3b = p3.b() * dq3 - q3.b() * dp3; - RT diff3c = p3.c() * dq3 - q3.c() * dp3; - - return (CGAL::sign_of_determinant(diff1a, diff2a, diff3a, - diff1b, diff2b, diff3b, - diff1c, diff2c, diff3c)); - } - - private: - Point_3 origin; - }; } // namespace Convex_hull_3 } // namespace CGAL