* removed cruft from lazy

* Circular_kernel_3 fixed by removing inheritance
This commit is contained in:
Philipp Möller 2011-11-25 11:20:34 +00:00
parent 9dac440ba9
commit 5b5827839b
2 changed files with 31 additions and 63 deletions

View File

@ -411,18 +411,8 @@ template < class SK > \
template < class SK >
class Construct_sphere_3
#ifndef CGAL_CFG_MATCHING_BUG_6
: public SK::Linear_kernel::Construct_sphere_3
#endif
{
typedef typename SK::Circular_arc_3 Circular_arc_3;
public:
typedef typename SK::Linear_kernel::Construct_sphere_3::result_type result_type;
#ifndef CGAL_CFG_MATCHING_BUG_6
using SK::Linear_kernel::Construct_sphere_3::operator();
#else
typedef typename SK::Linear_kernel LK;
typedef typename LK::Point_3 Point_3;
typedef typename LK::Circle_3 Circle_3;
@ -430,6 +420,9 @@ template < class SK > \
typedef typename LK::Construct_sphere_3 LK_Construct_sphere_3;
typedef typename LK::FT FT;
public:
typedef typename SK::Linear_kernel::Construct_sphere_3::result_type result_type;
result_type
operator()( Return_base_tag tag, const Point_3& center, const FT& squared_radius,
@ -492,11 +485,6 @@ template < class SK > \
operator() (const Circle_3 & c) const
{ return LK_Construct_sphere_3()(c); }
#endif
result_type
operator() ( const typename SK::Polynomial_for_spheres_2_3 &eq )
{ return SphericalFunctors::construct_sphere_3<SK>(eq); }
@ -508,19 +496,8 @@ template < class SK > \
template < class SK >
class Construct_plane_3
#ifndef CGAL_CFG_MATCHING_BUG_6
: public SK::Linear_kernel::Construct_plane_3
#endif
{
typedef typename SK::Circular_arc_3 Circular_arc_3;
public:
typedef typename SK::Linear_kernel::Construct_plane_3::result_type result_type;
#ifndef CGAL_CFG_MATCHING_BUG_6
using SK::Linear_kernel::Construct_plane_3::operator();
#else
typedef typename SK::Linear_kernel LK;
typedef typename LK::Construct_plane_3 LK_Construct_plane_3;
typedef typename LK::RT RT;
@ -533,6 +510,10 @@ template < class SK > \
typedef typename LK::Plane_3 Plane_3;
typedef typename LK::Circle_3 Circle_3;
public:
typedef typename SK::Linear_kernel::Construct_plane_3::result_type result_type;
public:
result_type
@ -599,8 +580,6 @@ template < class SK > \
operator()(const Circle_3 & c) const
{ return this->operator()(Return_base_tag(), c); }
#endif
result_type
operator() ( const typename SK::Polynomial_1_3 &eq )
{ return SphericalFunctors::construct_plane_3<SK>(eq); }
@ -616,70 +595,61 @@ template < class SK > \
{
typedef typename SK::Line_arc_3 Line_arc_3;
typedef typename SK::Line_3 Line_3;
typedef typename SK::Linear_kernel::Construct_line_3::result_type forwarded_result_type;
public:
typedef typename SK::Point_3 Point_3;
typedef typename SK::Direction_3 Direction_3;
typedef typename SK::Vector_3 Vector_3;
typedef typename SK::Segment_3 Segment_3;
typedef typename SK::Ray_3 Ray_3;
public:
typedef typename SK::Linear_kernel::Construct_line_3 LK_Construct_line_3;
typedef typename LK_Construct_line_3::result_type result_type;
template<class>
struct result {
typedef forwarded_result_type type;
};
template<typename F>
struct result<F(Line_arc_3)> {
typdef const forwarded_result_type& type;
};
forwarded_result_type
result_type
operator()(Return_base_tag, const Point_3& p, const Point_3& q) const
{ return LK_Construct_line_3()(p, Vector_3(p, q)); }
forwarded_result_type
result_type
operator()(Return_base_tag, const Point_3& p, const Direction_3& d) const
{ return operator()(Return_base_tag(), p, Vector_3(d.dx(), d.dy(), d.dz())); }
forwarded_result_type
result_type
operator()(Return_base_tag, const Point_3& p, const Vector_3& v) const
{ return LK_Construct_line_3()(p, v); }
forwarded_result_type
result_type
operator()(Return_base_tag, const Segment_3& s) const
{ return LK_Construct_line_3()(s.source(), Vector_3(s.source(), s.target())); }
forwarded_result_type
result_type
operator()(Return_base_tag, const Ray_3& r) const
{ return LK_Construct_line_3()(r.source(), Vector_3(r.source(), r.second_point())); }
forwarded_result_type
result_type
operator()(const Point_3& p, const Point_3& q) const
{ return this->operator()(Return_base_tag(), p, q); }
forwarded_result_type
result_type
operator()(const Point_3& p, const Direction_3& d) const
{ return this->operator()(Return_base_tag(), p, d); }
forwarded_result_type
result_type
operator()(const Point_3& p, const Vector_3& v) const
{ return this->operator()(Return_base_tag(), p, v); }
forwarded_result_type
result_type
operator()(const Segment_3& s) const
{ return this->operator()(Return_base_tag(), s); }
forwarded_result_type
result_type
operator()(const Ray_3& r) const
{ return this->operator()(Return_base_tag(), r); }
const forwarded_result_type& operator() (const Line_arc_3 & a) const
const result_type&
operator() (const Line_arc_3 & a) const
{ return (a.rep().supporting_line()); }
forwarded_result_type
result_type
operator() ( const typename SK::Polynomials_for_line_3 &eq )
{ return SphericalFunctors::construct_line_3<SK>(eq); }

View File

@ -31,6 +31,7 @@
#include <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h>
#include <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h>
#include <CGAL/Lazy.h>
#include <boost/mpl/if.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/not.hpp>
@ -47,9 +48,6 @@ struct Delayed_void_result {
typedef typename T::template result<void>::type type;
};
template<typename T>
struct foobar;
// goes through the standard process of selecting the right
// Lazy_something after the kind of the return type has been
// determined
@ -76,6 +74,7 @@ class Lazy_kernel_generic_base
// TODO : Static_filters_base too ? Check performance
{
public:
typedef AK_ Approximate_kernel;
typedef EK_ Exact_kernel;
typedef E2A_ E2A;
@ -158,7 +157,6 @@ public:
typedef Filtered_predicate<typename Exact_kernel::P, typename Approximate_kernel::P, C2E, C2F> P; \
P Pf() const { return P(); }
// We change the constructions.
#ifdef CGAL_INTERSECT_WITH_ITERATORS_2
#define CGAL_Kernel_cons(C, Cf) \