mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'cgal/releases/CGAL-4.9-branch'
This commit is contained in:
commit
64f7f5892e
|
|
@ -180,6 +180,12 @@ struct CK2_Intersection_traits<CK, typename CK::Circle_2, typename CK::Line_2> :
|
||||||
public CK2_Intersection_traits<CK, typename CK::Line_2, typename CK::Circle_2>
|
public CK2_Intersection_traits<CK, typename CK::Line_2, typename CK::Circle_2>
|
||||||
{};
|
{};
|
||||||
|
|
||||||
|
template<typename CK>
|
||||||
|
struct CK2_Intersection_traits<CK, typename CK::Line_2, typename CK::Line_2>
|
||||||
|
{
|
||||||
|
typedef typename Intersection_traits<CK, typename CK::Line_2, typename CK::Line_2>::result_type type;
|
||||||
|
};
|
||||||
|
|
||||||
} //end of namespace CGAL
|
} //end of namespace CGAL
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
|
|
@ -635,6 +635,15 @@ namespace CircularFunctors {
|
||||||
OutputIterator res) const
|
OutputIterator res) const
|
||||||
{ return CircularFunctors::intersect_2<CK> (l,la,res); }
|
{ return CircularFunctors::intersect_2<CK> (l,la,res); }
|
||||||
|
|
||||||
|
template < class OutputIterator >
|
||||||
|
OutputIterator
|
||||||
|
operator()(const Line & l1, const Line & l2,
|
||||||
|
OutputIterator res) const
|
||||||
|
{
|
||||||
|
*res++=typename CK::Linear_kernel::Intersect_2()(l1, l2);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template < class CK >
|
template < class CK >
|
||||||
|
|
|
||||||
|
|
@ -567,9 +567,6 @@ namespace CircularFunctors {
|
||||||
const typename CK::Circular_arc_2 &c,
|
const typename CK::Circular_arc_2 &c,
|
||||||
OutputIterator res )
|
OutputIterator res )
|
||||||
{
|
{
|
||||||
typedef std::vector<CGAL::Object > solutions_container;
|
|
||||||
typedef typename CK::Circular_arc_point_2 Circular_arc_point_2;
|
|
||||||
|
|
||||||
#if defined(CGAL_CK_EXPLOIT_IDENTITY) || \
|
#if defined(CGAL_CK_EXPLOIT_IDENTITY) || \
|
||||||
defined(CGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES)
|
defined(CGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES)
|
||||||
typedef typename CK::Line_arc_2 Line_arc_2;
|
typedef typename CK::Line_arc_2 Line_arc_2;
|
||||||
|
|
@ -677,7 +674,8 @@ namespace CircularFunctors {
|
||||||
}
|
}
|
||||||
#endif // CGAL_CK_EXPLOIT_IDENTITY
|
#endif // CGAL_CK_EXPLOIT_IDENTITY
|
||||||
|
|
||||||
typedef std::vector<CGAL::Object > solutions_container;
|
typedef std::vector<typename CK2_Intersection_traits<CK, typename CK::Line_2, typename CK::Circle_2>::type>
|
||||||
|
solutions_container;
|
||||||
solutions_container solutions;
|
solutions_container solutions;
|
||||||
|
|
||||||
#ifdef CGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES
|
#ifdef CGAL_INTERSECTION_MAP_FOR_SUPPORTING_CIRCLES
|
||||||
|
|
@ -697,25 +695,30 @@ namespace CircularFunctors {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
for (typename solutions_container::iterator it = solutions.begin();
|
for (typename solutions_container::iterator it = solutions.begin();
|
||||||
it != solutions.end(); ++it) {
|
it != solutions.end(); ++it)
|
||||||
const std::pair<Circular_arc_point_2, unsigned>
|
{
|
||||||
*result = CGAL::object_cast
|
#if CGAL_INTERSECTION_VERSION < 2
|
||||||
<std::pair<Circular_arc_point_2, unsigned> > (&(*it));
|
if(const std::pair<typename CK::Circular_arc_point_2, unsigned>* p =
|
||||||
#ifdef CGAL_CK_TEST_BBOX_BEFORE_HAS_ON
|
object_cast< std::pair< typename CK::Circular_arc_point_2, unsigned> >(& (*it)))
|
||||||
Bbox_2 rb = result->first.bbox();
|
{
|
||||||
if(do_overlap(l.bbox(), rb) && do_overlap(c.bbox(),rb)){
|
#ifdef CGAL_CK_TEST_BBOX_BEFORE_HAS_ON
|
||||||
if (has_on<CK>(l,result->first,true) &&
|
Bbox_2 rb = p->first.bbox();
|
||||||
has_on<CK>(c,result->first,true)) {
|
if(!do_overlap(l.bbox(), rb) || !do_overlap(c.bbox(),rb)) continue;
|
||||||
*res++ = *it;
|
#endif
|
||||||
}
|
Has_on_visitor<CK, typename CK::Line_arc_2> vis1(&l);
|
||||||
}
|
Has_on_visitor<CK, typename CK::Circular_arc_2> vis2(&c);
|
||||||
#else
|
if(vis1(*p) && vis2(*p))
|
||||||
if (has_on<CK>(l,result->first,true) &&
|
*res++ = *it;
|
||||||
has_on<CK>(c,result->first,true)) {
|
}
|
||||||
|
#else
|
||||||
|
if(boost::apply_visitor(Has_on_visitor<CK, typename CK::Line_arc_2>(&l), *it) &&
|
||||||
|
boost::apply_visitor(Has_on_visitor<CK, typename CK::Circular_arc_2>(&c), *it) )
|
||||||
|
{
|
||||||
*res++ = *it;
|
*res++ = *it;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,13 @@ intersection(const Line_2 <K> &c1, const Circle_2 <K> &c2, OutputIterator res)
|
||||||
return typename K::Intersect_2()(c1, c2, res);
|
return typename K::Intersect_2()(c1, c2, res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template < class OutputIterator, class K >
|
||||||
|
OutputIterator
|
||||||
|
intersection(const Line_2 <K> &c1, const Line_2 <K> &c2, OutputIterator res)
|
||||||
|
{
|
||||||
|
return typename K::Intersect_2()(c1, c2, res);
|
||||||
|
}
|
||||||
|
|
||||||
CGAL_CIRCULAR_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_(Circular_arc_2, Circular_arc_2)
|
CGAL_CIRCULAR_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_(Circular_arc_2, Circular_arc_2)
|
||||||
CGAL_CIRCULAR_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_(Line_arc_2, Line_arc_2)
|
CGAL_CIRCULAR_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_(Line_arc_2, Line_arc_2)
|
||||||
CGAL_CIRCULAR_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_(Line_arc_2, Circle_2)
|
CGAL_CIRCULAR_KERNEL_MACRO_GLOBAL_FUNCTION_INTERSECTION_(Line_arc_2, Circle_2)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue