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 100755 index 00000000000..0a3ff615297 --- /dev/null +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Is_degenerate_3.h @@ -0,0 +1,83 @@ +// 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 + + template + result_type + operator()(const T& t) const + { + return Base()(t); + } +#endif + + + 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)); + } + +}; // class Is_degenerate_3 + +} // namespace Static_filters_predicates + +} // namespace internal + + +} //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..daac965e9b1 100644 --- a/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h +++ b/Filtered_kernel/include/CGAL/internal/Static_filters/Static_filters.h @@ -37,6 +37,7 @@ #include #include #include +# include #ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS # include #endif // CGAL_NO_ANGLE_3_STATIC_FILTERS @@ -88,7 +89,7 @@ class Static_filters : public K_base { has_cheap_access_to_cartesian_coordinates> Self; public: - + typedef Static_filters_predicates::Is_degenerate_3 Is_degenerate_3; typedef Static_filters_predicates::Orientation_2 Orientation_2; typedef Static_filters_predicates::Orientation_3 Orientation_3; #ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS @@ -109,6 +110,10 @@ public: orientation_3_object() const { return Orientation_3(); } + Is_degenerate_3 + is_degenerate_3_object() const + { return Is_degenerate_3(); } + #ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS Angle_3 angle_3_object() const