Construct_supporting_{X} to Construct_X

This commit is contained in:
Pedro Machado Manhaes de Castro 2008-09-15 18:58:21 +00:00
parent e784625207
commit 2040ef0817
3 changed files with 21 additions and 53 deletions

View File

@ -144,10 +144,10 @@ namespace CGAL {
}
typename Qualified_result_of
<typename R::Construct_supporting_circle_3,Circular_arc_3>::type
<typename R::Construct_circle_3,Circular_arc_3>::type
supporting_circle() const
{
return typename R::Construct_supporting_circle_3()(*this);
return typename R::Construct_circle_3()(*this);
}
Sphere_3 diametral_sphere() const
@ -167,7 +167,7 @@ namespace CGAL {
Plane_3 supporting_plane() const
{
return typename R::Construct_supporting_plane_3()(*this);
return typename R::Construct_plane_3()(*this);
}
Bbox_3 bbox() const

View File

@ -335,6 +335,8 @@ template < class SK > \
template < class SK >
class Construct_plane_3 : public SK::Linear_kernel::Construct_plane_3
{
typedef typename SK::Circular_arc_3 Circular_arc_3;
public:
typedef typename SK::Linear_kernel::Construct_plane_3::result_type result_type;
@ -344,6 +346,9 @@ template < class SK > \
result_type
operator() ( const typename SK::Polynomial_1_3 &eq )
{ return construct_plane_3<SK>(eq); }
result_type operator() (const Circular_arc_3 & c) const
{ return c.rep().supporting_plane(); }
};
template <class SK>
@ -381,10 +386,12 @@ template < class SK > \
typedef typename SK::Circle_3 Circle_3;
typedef typename SK::Vector_3 Vector_3;
typedef typename SK::Direction_3 Direction_3;
typedef typename SK::Circular_arc_3 Circular_arc_3;
typedef typename SK::Kernel_base::Circle_3 RCircle_3;
typedef typename Circle_3::Rep Rep;
typedef typename SK::Linear_kernel::Construct_circle_3::result_type result_type;
typedef const result_type & qualified_result_type;
using SK::Linear_kernel::Construct_circle_3::operator();
@ -392,40 +399,12 @@ template < class SK > \
operator() ( const typename SK::Polynomials_for_circle_3 &eq )
{ return Rep(construct_circle_3<SK>(eq)); }
qualified_result_type operator() (const Circular_arc_3 & a) const
{ return (a.rep().supporting_circle()); }
};
template <class SK>
class Construct_supporting_plane_3 : public SK::Linear_kernel::Construct_supporting_plane_3
{
typedef typename SK::Plane_3 Plane_3;
typedef typename SK::Circle_3 Circle_3;
typedef typename SK::Circular_arc_3 Circular_arc_3;
public:
typedef typename SK::Linear_kernel::Construct_supporting_plane_3::result_type result_type;
using SK::Linear_kernel::Construct_supporting_plane_3::operator();
result_type operator() (const Circular_arc_3 & c) const
{ return c.rep().supporting_plane(); }
};
template <class SK>
class Construct_supporting_sphere_3: Has_qrt
{
typedef typename SK::Sphere_3 Sphere_3;
typedef typename SK::Circle_3 Circle_3;
public:
typedef Sphere_3 result_type;
typedef const result_type& qualified_result_type;
qualified_result_type operator() (const Circle_3 & c) const
{ return c.rep().supporting_sphere(); }
};
template <class SK>
class Construct_diametral_sphere_3 : public SK::Linear_kernel::Construct_diametral_sphere_3
{
@ -690,22 +669,6 @@ template < class SK > \
};
template <class SK>
class Construct_supporting_circle_3 : Has_qrt
{
typedef typename SK::Circular_arc_3 Circular_arc_3;
typedef typename SK::Circle_3 Circle_3;
public:
typedef Circle_3 result_type;
typedef const result_type & qualified_result_type;
qualified_result_type operator() (const Circular_arc_3 & a) const
{ return (a.rep().supporting_circle()); }
};
template < class SK >
class Has_on_3
: public SK::Linear_kernel::Has_on_3
@ -1385,6 +1348,13 @@ struct Qualified_result_of<SphericalFunctors::Construct_line_3<K>,
typedef typename K::Line_3 const & type;
};
template < typename K >
struct Qualified_result_of<SphericalFunctors::Construct_circle_3<K>,
typename K::Circular_arc_3>
{
typedef typename K::Circle_3 const & type;
};
} // namespace CGAL
#endif // CGAL_SPHERICAL_KERNEL_FUNCTION_OBJECTS_POLYNOMIAL_SPHERE_H

View File

@ -37,7 +37,6 @@
CGAL_Spherical_Kernel_cons(Construct_circular_arc_3, construct_circular_arc_3_object)
CGAL_Spherical_Kernel_cons(Construct_circle_3, construct_circle_3_object)
CGAL_Spherical_Kernel_cons(Construct_diametral_sphere_3, construct_diametral_sphere_3_object)
CGAL_Spherical_Kernel_cons(Construct_supporting_plane_3, construct_supporting_plane_3_object)
CGAL_Spherical_Kernel_cons(Compute_circular_x_3, compute_circular_x_3_object)
CGAL_Spherical_Kernel_cons(Compute_circular_y_3, compute_circular_y_3_object)
CGAL_Spherical_Kernel_cons(Compute_circular_z_3, compute_circular_z_3_object)
@ -46,7 +45,6 @@
CGAL_Spherical_Kernel_cons(Construct_circular_source_vertex_3, construct_circular_source_vertex_3_object)
CGAL_Spherical_Kernel_cons(Construct_circular_target_vertex_3, construct_circular_target_vertex_3_object)
CGAL_Spherical_Kernel_cons(Construct_line_3, construct_line_3_object)
CGAL_Spherical_Kernel_cons(Construct_supporting_circle_3, construct_supporting_circle_3_object)
CGAL_Spherical_Kernel_cons(Intersect_3, intersect_3_object)
CGAL_Spherical_Kernel_cons(Construct_bbox_3, construct_bbox_3_object)
CGAL_Spherical_Kernel_cons(Split_3, split_3_object)