From cc75efdbb5d0fccbb2ca1853f5f4d4d454e4a468 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 7 Nov 2019 15:57:23 +0100 Subject: [PATCH] Add static filter for Coplanar_3 --- .../CGAL/internal/Static_filters/Coplanar_3.h | 54 +++++++++++++++++++ .../internal/Static_filters/Static_filters.h | 9 ++++ .../include/CGAL/Kernel/interface_macros.h | 2 +- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 Filtered_kernel/include/CGAL/internal/Static_filters/Coplanar_3.h diff --git a/Filtered_kernel/include/CGAL/internal/Static_filters/Coplanar_3.h b/Filtered_kernel/include/CGAL/internal/Static_filters/Coplanar_3.h new file mode 100644 index 00000000000..20fbade4402 --- /dev/null +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Coplanar_3.h @@ -0,0 +1,54 @@ +// Copyright (c) 2011 GeometryFactory (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// +// Author(s) : Andreas Fabri, Laurent Rineau + + +#ifndef CGAL_INTERNAL_STATIC_FILTERS_COPLANAR_3_H +#define CGAL_INTERNAL_STATIC_FILTERS_COPLANAR_3_H + +namespace CGAL { + +namespace internal { + +namespace Static_filters_predicates { + + +template < typename K_base, typename SFK > +class Coplanar_3 + : public K_base::Coplanar_3 +{ + typedef typename K_base::Point_3 Point_3; + typedef typename K_base::Coplanar_3 Base; + typedef typename SFK::Orientation_3 Orientation_3; + +public: + + typedef typename Base::result_type result_type; + + + + result_type + operator()(const Point_3& p,const Point_3& q, const Point_3& r, const Point_3& s) const + { + return Orientation_3()(p,q,r,s) == COPLANAR; + } + + + +}; // end class Coplanar_3 + +} // end namespace Static_filters_predicates + +} // end namespace internal + +} // end namespace CGAL + +#endif // CGAL_INTERNAL_STATIC_FILTERS_COPLANAR_3_H diff --git a/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h b/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h index 9dbf6c02f5b..95216db79f9 100644 --- a/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h @@ -42,6 +42,8 @@ #endif // CGAL_DISABLE_STATIC_FILTERS_ADDED_2011 +# include + #ifndef CGAL_NO_EQUAL_3_STATIC_FILTERS # include # include @@ -96,6 +98,7 @@ class Static_filters : public K_base { typedef Static_filters Self; + typedef Static_filters_predicates::Coplanar_3 Coplanar_3; public: #ifndef CGAL_NO_EQUAL_3_STATIC_FILTERS typedef Static_filters_predicates::Equal_2 Equal_2; @@ -137,6 +140,12 @@ public: collinear_3_object() const { return Collinear_3(); } + Coplanar_3 + coplanar_3_object() const + { + return Coplanar_3(); + } + #ifndef CGAL_NO_EQUAL_3_STATIC_FILTERS Equal_2 equal_2_object() const diff --git a/Kernel_23/include/CGAL/Kernel/interface_macros.h b/Kernel_23/include/CGAL/Kernel/interface_macros.h index efe62876159..18d35b53366 100644 --- a/Kernel_23/include/CGAL/Kernel/interface_macros.h +++ b/Kernel_23/include/CGAL/Kernel/interface_macros.h @@ -488,7 +488,7 @@ CGAL_Kernel_pred_RT(Coplanar_orientation_3, coplanar_orientation_3_object) CGAL_Kernel_pred_RT(Coplanar_side_of_bounded_circle_3, coplanar_side_of_bounded_circle_3_object) -CGAL_Kernel_pred(Coplanar_3, +CGAL_Kernel_pred_RT(Coplanar_3, coplanar_3_object) CGAL_Kernel_pred(Counterclockwise_in_between_2, counterclockwise_in_between_2_object)