mirror of https://github.com/CGAL/cgal
Drop Result and Intersection_traits from Circular_kernel_2
This commit is contained in:
parent
4685e2f440
commit
a6b596396c
|
|
@ -173,8 +173,8 @@ namespace internal {
|
||||||
_begin = CGAL::circle_intersect<CK>(c, c1, b_1);
|
_begin = CGAL::circle_intersect<CK>(c, c1, b_1);
|
||||||
_end = CGAL::circle_intersect<CK>(c, c2, b_2);
|
_end = CGAL::circle_intersect<CK>(c, c2, b_2);
|
||||||
} else {
|
} else {
|
||||||
typedef std::vector<typename Intersection_traits<CK, typename CK::Circle_2,
|
typedef std::vector<typename boost::result_of<typename CK::Intersect_2(typename CK::Circle_2,
|
||||||
typename CK::Circle_2>::result_type>
|
typename CK::Circle_2)>::type>
|
||||||
solutions_container;
|
solutions_container;
|
||||||
|
|
||||||
solutions_container solutions;
|
solutions_container solutions;
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ public:
|
||||||
intersect(const Line_2 & l, const Circle_2 & c, const bool b)
|
intersect(const Line_2 & l, const Circle_2 & c, const bool b)
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef std::vector<typename Intersection_traits<CK, Line_2, Circle_2>::result_type>
|
typedef std::vector<typename boost::result_of<typename CK::Intersect_2(Line_2, Circle_2)>::type>
|
||||||
solutions_container;
|
solutions_container;
|
||||||
|
|
||||||
solutions_container solutions;
|
solutions_container solutions;
|
||||||
|
|
@ -130,7 +130,7 @@ public:
|
||||||
CGAL_kernel_precondition(do_intersect(support, l1));
|
CGAL_kernel_precondition(do_intersect(support, l1));
|
||||||
CGAL_kernel_precondition(do_intersect(support, l2));
|
CGAL_kernel_precondition(do_intersect(support, l2));
|
||||||
//typedef typename Root_of_2::RT RT_2;
|
//typedef typename Root_of_2::RT RT_2;
|
||||||
typename Intersection_traits<CK, Line_2, Line_2>::result_type
|
typename boost::result_of<typename CK::Intersect_2(Line_2, Line_2)>::type
|
||||||
v = CGAL::internal::intersection(support, l1, CK());
|
v = CGAL::internal::intersection(support, l1, CK());
|
||||||
CGAL_assertion(v);
|
CGAL_assertion(v);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,6 @@
|
||||||
#include <CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h>
|
#include <CGAL/Circular_kernel_2/internal_functions_on_circular_arc_2.h>
|
||||||
#include <CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h>
|
#include <CGAL/Circular_kernel_2/internal_functions_on_line_arc_2.h>
|
||||||
#include <CGAL/Bbox_2.h>
|
#include <CGAL/Bbox_2.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
namespace CircularFunctors {
|
namespace CircularFunctors {
|
||||||
|
|
@ -521,9 +520,9 @@ namespace CircularFunctors {
|
||||||
|
|
||||||
using CK::Linear_kernel::Intersect_2::operator();
|
using CK::Linear_kernel::Intersect_2::operator();
|
||||||
|
|
||||||
#if CGAL_INTERSECTION_VERSION < 2
|
#if CGAL_INTERSECTION_VERSION < 2
|
||||||
typedef typename CK::Linear_kernel::Intersect_2::result_type result_type;
|
typedef typename CK::Linear_kernel::Intersect_2::result_type result_type;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
template < class OutputIterator >
|
template < class OutputIterator >
|
||||||
OutputIterator
|
OutputIterator
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,8 @@ circle_intersect( const typename CK::Circle_2 & c1,
|
||||||
const typename CK::Circle_2 & c2,
|
const typename CK::Circle_2 & c2,
|
||||||
bool b )
|
bool b )
|
||||||
{
|
{
|
||||||
typedef std::vector<typename Intersection_traits<CK, typename CK::Circle_2,
|
typedef std::vector<typename boost::result_of<typename CK::Intersect_2(typename CK::Circle_2,
|
||||||
typename CK::Circle_2>::result_type> solutions_container;
|
typename CK::Circle_2)>::type> solutions_container;
|
||||||
solutions_container solutions;
|
solutions_container solutions;
|
||||||
|
|
||||||
intersection( c1, c2, std::back_inserter(solutions) );
|
intersection( c1, c2, std::back_inserter(solutions) );
|
||||||
|
|
@ -122,8 +122,8 @@ namespace CircularFunctors {
|
||||||
const typename CK::Circle_2 & c2,
|
const typename CK::Circle_2 & c2,
|
||||||
OutputIterator res )
|
OutputIterator res )
|
||||||
{
|
{
|
||||||
typedef typename Intersection_traits<CK, typename CK::Circle_2, typename CK::Circle_2>
|
typedef typename boost::result_of<typename CK::Intersect_2(typename CK::Circle_2, typename CK::Circle_2)>
|
||||||
::result_type result_type;
|
::type result_type;
|
||||||
typedef typename CK::Algebraic_kernel AK;
|
typedef typename CK::Algebraic_kernel AK;
|
||||||
typedef typename CK::Polynomial_for_circles_2_2 Equation;
|
typedef typename CK::Polynomial_for_circles_2_2 Equation;
|
||||||
typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2;
|
typedef typename CK::Root_for_circles_2_2 Root_for_circles_2_2;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@
|
||||||
#include <CGAL/Circular_kernel_2/internal_functions_on_circle_2.h>
|
#include <CGAL/Circular_kernel_2/internal_functions_on_circle_2.h>
|
||||||
#include <CGAL/Interval_nt.h>
|
#include <CGAL/Interval_nt.h>
|
||||||
#include <CGAL/Circular_kernel_2/Circular_arc_2.h>
|
#include <CGAL/Circular_kernel_2/Circular_arc_2.h>
|
||||||
#include <CGAL/Intersection_traits_2.h>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
namespace CircularFunctors {
|
namespace CircularFunctors {
|
||||||
|
|
@ -543,8 +542,8 @@ namespace CircularFunctors {
|
||||||
const typename CK::Circular_arc_2 &a2,
|
const typename CK::Circular_arc_2 &a2,
|
||||||
OutputIterator res )
|
OutputIterator res )
|
||||||
{
|
{
|
||||||
typedef typename Intersection_traits<CK, typename CK::Circular_arc_2,
|
typedef typename boost::result_of<typename CK::Intersect_2(typename CK::Circular_arc_2,
|
||||||
typename CK::Circular_arc_2 >::result_type result_type;
|
typename CK::Circular_arc_2)>::type result_type;
|
||||||
|
|
||||||
typedef std::vector<CGAL::Object> solutions_container;
|
typedef std::vector<CGAL::Object> solutions_container;
|
||||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||||
|
|
|
||||||
|
|
@ -381,8 +381,8 @@ namespace CircularFunctors {
|
||||||
const typename CK::Circle_2 & c,
|
const typename CK::Circle_2 & c,
|
||||||
OutputIterator res )
|
OutputIterator res )
|
||||||
{
|
{
|
||||||
typedef typename Intersection_traits<CK, typename CK::Line_2, typename CK::Circle_2>
|
typedef typename boost::result_of<typename CK::Intersect_2(typename CK::Line_2, typename CK::Circle_2)>
|
||||||
::result_type result_type;
|
::type result_type;
|
||||||
typedef typename CK::Algebraic_kernel AK;
|
typedef typename CK::Algebraic_kernel AK;
|
||||||
typedef typename CK::Polynomial_1_2 Equation_line;
|
typedef typename CK::Polynomial_1_2 Equation_line;
|
||||||
typedef typename CK::Polynomial_for_circles_2_2 Equation_circle;
|
typedef typename CK::Polynomial_for_circles_2_2 Equation_circle;
|
||||||
|
|
@ -416,8 +416,8 @@ namespace CircularFunctors {
|
||||||
const typename CK::Line_arc_2 &a2,
|
const typename CK::Line_arc_2 &a2,
|
||||||
OutputIterator res )
|
OutputIterator res )
|
||||||
{
|
{
|
||||||
typedef typename Intersection_traits<CK, typename CK::Line_arc_2, typename CK::Line_arc_2>
|
typedef typename boost::result_of<typename CK::Intersect_2(typename CK::Line_arc_2, typename CK::Line_arc_2)>
|
||||||
::result_type result_type;
|
::type result_type;
|
||||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||||
typedef typename CK::Point_2 Point_2;
|
typedef typename CK::Point_2 Point_2;
|
||||||
|
|
@ -482,7 +482,7 @@ namespace CircularFunctors {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Intersection_traits<CK, typename CK::Line_2, typename CK::Line_2>::result_type
|
typename boost::result_of<typename CK::Intersect_2(typename CK::Line_2, typename CK::Line_2)>::type
|
||||||
v = CGAL::internal::intersection(a1.supporting_line(), a2.supporting_line(), CK());
|
v = CGAL::internal::intersection(a1.supporting_line(), a2.supporting_line(), CK());
|
||||||
if(!v) return res;
|
if(!v) return res;
|
||||||
|
|
||||||
|
|
@ -515,7 +515,7 @@ namespace CircularFunctors {
|
||||||
const typename CK::Circle_2 &c,
|
const typename CK::Circle_2 &c,
|
||||||
OutputIterator res )
|
OutputIterator res )
|
||||||
{
|
{
|
||||||
typedef std::vector<typename Intersection_traits<CK, typename CK::Line_2, typename CK::Circle_2>::result_type>
|
typedef std::vector<typename boost::result_of<typename CK::Intersect_2(typename CK::Line_2, typename CK::Circle_2)>::type>
|
||||||
solutions_container;
|
solutions_container;
|
||||||
solutions_container solutions;
|
solutions_container solutions;
|
||||||
|
|
||||||
|
|
@ -556,8 +556,8 @@ namespace CircularFunctors {
|
||||||
const typename CK::Circular_arc_2 &c,
|
const typename CK::Circular_arc_2 &c,
|
||||||
OutputIterator res )
|
OutputIterator res )
|
||||||
{
|
{
|
||||||
typedef typename Intersection_traits<CK, typename CK::Line_arc_2, typename CK::Circular_arc_2 >
|
typedef typename boost::result_of<typename CK::Intersect_2(typename CK::Line_arc_2, typename CK::Circular_arc_2 )>
|
||||||
::result_type result_type;
|
::type result_type;
|
||||||
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
typedef typename CK::Circular_arc_2 Circular_arc_2;
|
||||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||||
|
|
@ -637,7 +637,7 @@ namespace CircularFunctors {
|
||||||
*res++ = result_type(std::make_pair(q,1u));
|
*res++ = result_type(std::make_pair(q,1u));
|
||||||
return res;
|
return res;
|
||||||
} else { //Case 4b
|
} else { //Case 4b
|
||||||
typedef std::vector<typename Intersection_traits<CK, typename CK::Line_2, typename CK::Circle_2>::result_type>
|
typedef std::vector<typename boost::result_of<typename CK::Intersect_2(typename CK::Line_2, typename CK::Circle_2)>::type>
|
||||||
container;
|
container;
|
||||||
container solutions;
|
container solutions;
|
||||||
CGAL::CircularFunctors::intersect_2<CK>( l.supporting_line(), c.supporting_circle(),
|
CGAL::CircularFunctors::intersect_2<CK>( l.supporting_line(), c.supporting_circle(),
|
||||||
|
|
@ -761,7 +761,7 @@ namespace CircularFunctors {
|
||||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||||
typedef typename CK::Point_2 Point_2;
|
typedef typename CK::Point_2 Point_2;
|
||||||
typedef typename CK::Line_2 Line_2;
|
typedef typename CK::Line_2 Line_2;
|
||||||
typedef typename Intersection_traits<CK, Line_2, Line_arc_2>::result_type result_type;
|
typedef typename boost::result_of<typename CK::Intersect_2(Line_2, Line_arc_2)>::type result_type;
|
||||||
|
|
||||||
if(LinearFunctors::non_oriented_equal<CK>(l, la.supporting_line())) {
|
if(LinearFunctors::non_oriented_equal<CK>(l, la.supporting_line())) {
|
||||||
*res++ = result_type(la);
|
*res++ = result_type(la);
|
||||||
|
|
@ -793,7 +793,7 @@ namespace CircularFunctors {
|
||||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
||||||
|
|
||||||
typedef typename CK::Line_2 Line_2;
|
typedef typename CK::Line_2 Line_2;
|
||||||
typedef std::vector< typename Intersection_traits<CK, Line_2, typename CK::Circle_2 >::result_type>
|
typedef std::vector< typename boost::result_of<typename CK::Intersect_2(Line_2, typename CK::Circle_2 )>::type>
|
||||||
solutions_container;
|
solutions_container;
|
||||||
|
|
||||||
solutions_container solutions;
|
solutions_container solutions;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ namespace internal { \
|
||||||
bool \
|
bool \
|
||||||
do_intersect(const typename K::A &c1, const typename K::B &c2, const K&) \
|
do_intersect(const typename K::A &c1, const typename K::B &c2, const K&) \
|
||||||
{ \
|
{ \
|
||||||
std::vector< typename K::Intersect_2::template Result<typename K::A, typename K::B>::Type > res; \
|
std::vector< typename boost::result_of<typename K::Intersect_2(typename K::A, typename K::B)>::type > res; \
|
||||||
typename K::Intersect_2()(c1,c2,std::back_inserter(res)); \
|
typename K::Intersect_2()(c1,c2,std::back_inserter(res)); \
|
||||||
return !res.empty(); \
|
return !res.empty(); \
|
||||||
} \
|
} \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue