mirror of https://github.com/CGAL/cgal
Reintegrate /branches/features/Static_filter_is_degenerate-GF
This adds a static filter for Is_degenerate_3.
This commit is contained in:
commit
19633dbf7a
|
|
@ -52,15 +52,14 @@ public:
|
|||
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
using Base::operator();
|
||||
#else
|
||||
|
||||
#else // CGAL_CFG_MATCHING_BUG_6
|
||||
template <typename T1, typename T2>
|
||||
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
|
||||
|
|
|
|||
|
|
@ -56,15 +56,14 @@ public:
|
|||
|
||||
#ifndef CGAL_CFG_MATCHING_BUG_6
|
||||
using Base::operator();
|
||||
#else
|
||||
|
||||
#else // CGAL_CFG_MATCHING_BUG_6
|
||||
template <typename T1, typename T2>
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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 <typename T>
|
||||
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
|
||||
|
|
@ -37,12 +37,26 @@
|
|||
#include <CGAL/internal/Static_filters/tools.h>
|
||||
#include <CGAL/internal/Static_filters/Orientation_2.h>
|
||||
#include <CGAL/internal/Static_filters/Orientation_3.h>
|
||||
|
||||
// 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 <CGAL/internal/Static_filters/Is_degenerate_3.h>
|
||||
#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
|
||||
|
||||
#ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS
|
||||
# include <CGAL/internal/Static_filters/Angle_3.h>
|
||||
#endif // CGAL_NO_ANGLE_3_STATIC_FILTERS
|
||||
#endif // NOT CGAL_NO_ANGLE_3_STATIC_FILTERS
|
||||
|
||||
#ifndef CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
|
||||
# include <CGAL/internal/Static_filters/Do_intersect_3.h>
|
||||
#endif // NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
|
||||
#endif // NOT NOT CGAL_NO_DO_INTERSECT_3_STATIC_FILTERS
|
||||
|
||||
#include <CGAL/internal/Static_filters/Compare_y_at_x_2.h>
|
||||
#include <CGAL/internal/Static_filters/Side_of_oriented_circle_2.h>
|
||||
#include <CGAL/internal/Static_filters/Side_of_oriented_sphere_3.h>
|
||||
|
|
@ -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<K_base> Is_degenerate_3;
|
||||
#endif // NOT CGAL_NO_IS_DEGENERATE_3_STATIC_FILTERS
|
||||
typedef Static_filters_predicates::Orientation_2<K_base> Orientation_2;
|
||||
typedef Static_filters_predicates::Orientation_3<K_base> Orientation_3;
|
||||
#ifndef CGAL_NO_ANGLE_3_STATIC_FILTERS
|
||||
typedef Static_filters_predicates::Angle_3<K_base> 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<K_base> 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
|
||||
|
|
|
|||
Loading…
Reference in New Issue