diff --git a/Filtered_kernel/include/CGAL/internal/Static_filters/Angle_3.h b/Filtered_kernel/include/CGAL/internal/Static_filters/Angle_3.h index 5008b1bbfdf..43e0f782bf6 100644 --- a/Filtered_kernel/include/CGAL/internal/Static_filters/Angle_3.h +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Angle_3.h @@ -52,15 +52,14 @@ public: #ifndef CGAL_CFG_MATCHING_BUG_6 using Base::operator(); -#else - +#else // CGAL_CFG_MATCHING_BUG_6 template result_type operator()(const T1& t1, const T2& t2) const { return Base()(t1,t2); } -#endif +#endif // CGAL_CFG_MATCHING_BUG_6 Sign sign_with_error(const double x, const double error) const { @@ -155,13 +154,12 @@ public: return err; } -}; // class Angle_3 +}; // end class Angle_3 -} // namespace Static_filters_predicates +} // end namespace Static_filters_predicates -} // namespace internal +} // end namespace internal - -} //namespace CGAL +} // end namespace CGAL #endif // CGAL_INTERNAL_STATIC_FILTERS_ANGLE_3_H diff --git a/Filtered_kernel/include/CGAL/internal/Static_filters/Do_intersect_3.h b/Filtered_kernel/include/CGAL/internal/Static_filters/Do_intersect_3.h index 5b6cd4e0316..7ac0e6136f6 100644 --- a/Filtered_kernel/include/CGAL/internal/Static_filters/Do_intersect_3.h +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Do_intersect_3.h @@ -56,15 +56,14 @@ public: #ifndef CGAL_CFG_MATCHING_BUG_6 using Base::operator(); -#else - +#else // CGAL_CFG_MATCHING_BUG_6 template result_type operator()(const T1& t1, const T2& t2) const { return Base()(t1,t2); } -#endif +#endif // CGAL_CFG_MATCHING_BUG_6 Sign sign_with_error(const double x, const double error) const { @@ -493,11 +492,11 @@ public: }; // class Do_intersect_3 -} // namespace Static_filters_predicates +} // end namespace Static_filters_predicates -} // namespace internal +} // end namespace internal -} //namespace CGAL +} // end namespace CGAL #endif // CGAL_INTERNAL_STATIC_FILTERS_DO_INTERSECT_3_H diff --git a/Filtered_kernel/include/CGAL/internal/Static_filters/Is_degenerate_3.h b/Filtered_kernel/include/CGAL/internal/Static_filters/Is_degenerate_3.h new file mode 100644 index 00000000000..ec21318cfcd --- /dev/null +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Is_degenerate_3.h @@ -0,0 +1,81 @@ +// Copyright (c) 2011 GeometryFactory (France) +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org); you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public License as +// published by the Free Software Foundation; version 2.1 of the License. +// See the file LICENSE.LGPL distributed with CGAL. +// +// Licensees holding a valid commercial license may use this file in +// accordance with the commercial license agreement provided with the software. +// +// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Andreas Fabri, Laurent Rineau + + +#ifndef CGAL_INTERNAL_STATIC_FILTERS_IS_DEGENERATE_3_H +#define CGAL_INTERNAL_STATIC_FILTERS_IS_DEGENERATE_3_H + +namespace CGAL { + +namespace internal { + +namespace Static_filters_predicates { + + +template < typename K_base > +class Is_degenerate_3 + : public K_base::Is_degenerate_3 +{ + typedef typename K_base::Ray_3 Ray_3; + typedef typename K_base::Segment_3 Segment_3; + typedef typename K_base::Is_degenerate_3 Base; + typedef typename K_base::Construct_source_3 Construct_source_3; + typedef typename K_base::Construct_target_3 Construct_target_3; + typedef typename K_base::Construct_second_point_3 Construct_second_point_3; + typedef typename K_base::Equal_3 Equal_3; +public: + + typedef typename Base::result_type result_type; + + +#ifndef CGAL_CFG_MATCHING_BUG_6 + using Base::operator(); +#else // CGAL_CFG_MATCHING_BUG_6 + template + result_type + operator()(const T& t) const + { + return Base()(t); + } +#endif // end CGAL_CFG_MATCHING_BUG_6 + + + result_type + operator()(const Segment_3& s) const + { + return Equal_3()(Construct_source_3()(s), Construct_target_3()(s)); + } + + + result_type + operator()(const Ray_3& r) const + { + return Equal_3()(Construct_source_3()(r), Construct_second_point_3()(r)); + } + +}; // end class Is_degenerate_3 + +} // end namespace Static_filters_predicates + +} // end namespace internal + +} // end namespace CGAL + +#endif // CGAL_INTERNAL_STATIC_FILTERS_IS_DEGENERATE_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 b411e6eb0bc..1064a7ad0c0 100644 --- a/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h @@ -37,12 +37,26 @@ #include #include #include + +// for static filters added nov./dec. 2011 +#ifdef CGAL_DISABLE_RECENTLY_ADDED_STATIC_FILTERS +# define CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS 1 +# define CGAL_NO_ANGLE_3_STATIC_FILTERS 1 +# define CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS 1 +#endif // CGAL_DISABLE_RECENTLY_ADDED_STATIC_FILTERS + +#ifndef CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS +# include +#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS + #ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS # include -#endif // CGAL_NO_ANGLE_3_STATIC_FILTERS +#endif // NOT CGAL_NO_ANGLE_3_STATIC_FILTERS + #ifndef CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS # include -#endif // NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS +#endif // NOT NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS + #include #include #include @@ -88,12 +102,14 @@ class Static_filters : public K_base { has_cheap_access_to_cartesian_coordinates> Self; public: - +#ifndef CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS + typedef Static_filters_predicates::Is_degenerate_3 Is_degenerate_3; +#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS typedef Static_filters_predicates::Orientation_2 Orientation_2; typedef Static_filters_predicates::Orientation_3 Orientation_3; #ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS typedef Static_filters_predicates::Angle_3 Angle_3; -#endif // CGAL_NO_ANGLE_3_STATIC_FILTERS +#endif // NOT CGAL_NO_ANGLE_3_STATIC_FILTERS #ifndef CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS typedef Static_filters_predicates::Do_intersect_3 Do_intersect_3; #endif // NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS @@ -109,6 +125,12 @@ public: orientation_3_object() const { return Orientation_3(); } +#ifndef CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS + Is_degenerate_3 + is_degenerate_3_object() const + { return Is_degenerate_3(); } +#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS + #ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS Angle_3 angle_3_object() const