mirror of https://github.com/CGAL/cgal
Replace Intersection_traits with result_of
This commit is contained in:
parent
542b0df6cf
commit
9d4d5e6e7d
|
|
@ -164,7 +164,7 @@ namespace CGAL {
|
||||||
const Sphere_3 &s1, bool less_xyz_s1,
|
const Sphere_3 &s1, bool less_xyz_s1,
|
||||||
const Sphere_3 &s2, bool less_xyz_s2)
|
const Sphere_3 &s2, bool less_xyz_s2)
|
||||||
{
|
{
|
||||||
typedef typename Intersection_traits<SK, Circle_3, Sphere_3>::result_type result_type;
|
typedef typename boost::result_of<typename SK::Intersect_3(Circle_3, Sphere_3)>::type result_type;
|
||||||
std::vector<result_type> sols1, sols2;
|
std::vector<result_type> sols1, sols2;
|
||||||
// The spheres must not include the circle
|
// The spheres must not include the circle
|
||||||
CGAL_kernel_precondition(!SK().has_on_3_object()(s1,c));
|
CGAL_kernel_precondition(!SK().has_on_3_object()(s1,c));
|
||||||
|
|
@ -191,7 +191,7 @@ namespace CGAL {
|
||||||
const Plane_3 &p1, bool less_xyz_p1,
|
const Plane_3 &p1, bool less_xyz_p1,
|
||||||
const Plane_3 &p2, bool less_xyz_p2)
|
const Plane_3 &p2, bool less_xyz_p2)
|
||||||
{
|
{
|
||||||
typedef typename Intersection_traits<SK, Circle_3, Plane_3>::result_type result_type;
|
typedef typename boost::result_of<typename SK::Intersect_3(Circle_3, Plane_3)>::type result_type;
|
||||||
std::vector<result_type> sols1, sols2;
|
std::vector<result_type> sols1, sols2;
|
||||||
// The planes must not include the circle
|
// The planes must not include the circle
|
||||||
CGAL_kernel_precondition(!SK().has_on_3_object()(p1,c));
|
CGAL_kernel_precondition(!SK().has_on_3_object()(p1,c));
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ public:
|
||||||
Circular_arc_point_3(const Line_3 &l,
|
Circular_arc_point_3(const Line_3 &l,
|
||||||
const Sphere_3 &s,
|
const Sphere_3 &s,
|
||||||
const bool less_xyz = true) {
|
const bool less_xyz = true) {
|
||||||
std::vector<typename Intersection_traits<SK, Line_3, Sphere_3>::result_type> sols;
|
std::vector<typename boost::result_of<typename SK::Intersect_3(Line_3, Sphere_3)>::type> sols;
|
||||||
SK().intersect_3_object()(l, s, std::back_inserter(sols));
|
SK().intersect_3_object()(l, s, std::back_inserter(sols));
|
||||||
// s1,s2,s3 must intersect
|
// s1,s2,s3 must intersect
|
||||||
CGAL_kernel_precondition(sols.size() != 0);
|
CGAL_kernel_precondition(sols.size() != 0);
|
||||||
|
|
@ -164,7 +164,7 @@ public:
|
||||||
Circular_arc_point_3(const Circle_3 &c,
|
Circular_arc_point_3(const Circle_3 &c,
|
||||||
const Plane_3 &p,
|
const Plane_3 &p,
|
||||||
const bool less_xyz = true) {
|
const bool less_xyz = true) {
|
||||||
std::vector<typename Intersection_traits<SK, Circle_3, Plane_3>::result_type> sols;
|
std::vector<typename boost::result_of<typename SK::Intersect_3(Circle_3, Plane_3)>::type> sols;
|
||||||
SK().intersect_3_object()(c, p, std::back_inserter(sols));
|
SK().intersect_3_object()(c, p, std::back_inserter(sols));
|
||||||
// s1,s2,s3 must intersect
|
// s1,s2,s3 must intersect
|
||||||
CGAL_kernel_precondition(sols.size() != 0);
|
CGAL_kernel_precondition(sols.size() != 0);
|
||||||
|
|
@ -186,7 +186,7 @@ public:
|
||||||
Circular_arc_point_3(const Circle_3 &c,
|
Circular_arc_point_3(const Circle_3 &c,
|
||||||
const Sphere_3 &s,
|
const Sphere_3 &s,
|
||||||
const bool less_xyz = true) {
|
const bool less_xyz = true) {
|
||||||
std::vector<typename Intersection_traits<SK, Circle_3, Sphere_3>::result_type> sols;
|
std::vector<typename boost::result_of<typename SK::Intersect_3(Circle_3, Sphere_3)>::type> sols;
|
||||||
SK().intersect_3_object()(c, s, std::back_inserter(sols));
|
SK().intersect_3_object()(c, s, std::back_inserter(sols));
|
||||||
// s1,s2,s3 must intersect
|
// s1,s2,s3 must intersect
|
||||||
CGAL_kernel_precondition(sols.size() != 0);
|
CGAL_kernel_precondition(sols.size() != 0);
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ namespace CGAL {
|
||||||
const Sphere_3 &s,
|
const Sphere_3 &s,
|
||||||
bool less_xyz_first = true)
|
bool less_xyz_first = true)
|
||||||
{
|
{
|
||||||
std::vector<typename Intersection_traits<SK, Line_3, Sphere_3>::result_type> sols;
|
std::vector<typename boost::result_of<typename SK::Intersect_3(Line_3, Sphere_3)>::type> sols;
|
||||||
SK().intersect_3_object()(l, s, std::back_inserter(sols));
|
SK().intersect_3_object()(l, s, std::back_inserter(sols));
|
||||||
// l must intersect s in 2 points
|
// l must intersect s in 2 points
|
||||||
CGAL_kernel_precondition(sols.size() == 2);
|
CGAL_kernel_precondition(sols.size() == 2);
|
||||||
|
|
@ -112,7 +112,7 @@ namespace CGAL {
|
||||||
const Sphere_3 &s1, bool less_xyz_s1,
|
const Sphere_3 &s1, bool less_xyz_s1,
|
||||||
const Sphere_3 &s2, bool less_xyz_s2)
|
const Sphere_3 &s2, bool less_xyz_s2)
|
||||||
{
|
{
|
||||||
std::vector<typename Intersection_traits<SK, Line_3, Sphere_3>::result_type> sols1, sols2;
|
std::vector<typename boost::result_of<typename SK::Intersect_3(Line_3, Sphere_3)>::type> sols1, sols2;
|
||||||
SK().intersect_3_object()(l, s1, std::back_inserter(sols1));
|
SK().intersect_3_object()(l, s1, std::back_inserter(sols1));
|
||||||
SK().intersect_3_object()(l, s2, std::back_inserter(sols2));
|
SK().intersect_3_object()(l, s2, std::back_inserter(sols2));
|
||||||
// l must intersect s1 and s2
|
// l must intersect s1 and s2
|
||||||
|
|
@ -135,7 +135,7 @@ namespace CGAL {
|
||||||
CGAL_kernel_precondition(!SK().has_on_3_object()(p1,l));
|
CGAL_kernel_precondition(!SK().has_on_3_object()(p1,l));
|
||||||
CGAL_kernel_precondition(!SK().has_on_3_object()(p2,l));
|
CGAL_kernel_precondition(!SK().has_on_3_object()(p2,l));
|
||||||
// l must intersect p1 and p2
|
// l must intersect p1 and p2
|
||||||
typedef typename Intersection_traits<SK, Line_3, Plane_3>::result_type Intersection;
|
typedef typename boost::result_of<typename SK::Intersect_3(Line_3, Plane_3)>::type Intersection;
|
||||||
Intersection i1 = SK().intersect_3_object()(l, p1);
|
Intersection i1 = SK().intersect_3_object()(l, p1);
|
||||||
Intersection i2 = SK().intersect_3_object()(l, p2);
|
Intersection i2 = SK().intersect_3_object()(l, p2);
|
||||||
const typename SK::Point_3* point1=boost::get<typename SK::Point_3>( & *i1 );
|
const typename SK::Point_3* point1=boost::get<typename SK::Point_3>( & *i1 );
|
||||||
|
|
|
||||||
|
|
@ -1105,19 +1105,19 @@ template < class SK > \
|
||||||
|
|
||||||
using SK::Linear_kernel::Do_intersect_3::operator();
|
using SK::Linear_kernel::Do_intersect_3::operator();
|
||||||
|
|
||||||
#define CGAL_SPHERICAL_KERNEL_MACRO_DO_INTERSECTION_3_2(A,B) \
|
#define CGAL_SPHERICAL_KERNEL_MACRO_DO_INTERSECTION_3_2(A,B) \
|
||||||
result_type \
|
result_type \
|
||||||
operator()(const A & c1, const B & c2) const \
|
operator()(const A & c1, const B & c2) const \
|
||||||
{ std::vector< typename Intersection_traits<SK, A, B>::result_type > res; \
|
{ std::vector< typename boost::result_of<typename SK::Intersect_3(A, B)>::type > res; \
|
||||||
typename SK::Intersect_3()(c1,c2,std::back_inserter(res)); \
|
typename SK::Intersect_3()(c1,c2,std::back_inserter(res)); \
|
||||||
return res.size() != 0; }
|
return !res.empty(); }
|
||||||
|
|
||||||
#define CGAL_SPHERICAL_KERNEL_MACRO_DO_INTERSECTION_3_3(A,B,C) \
|
#define CGAL_SPHERICAL_KERNEL_MACRO_DO_INTERSECTION_3_3(A,B,C) \
|
||||||
result_type \
|
result_type \
|
||||||
operator()(const A & c1, const B & c2, const C & c3) const \
|
operator()(const A & c1, const B & c2, const C & c3) const \
|
||||||
{ std::vector< typename ITs<SK>::result_type > res; \
|
{ std::vector< typename ITs<SK>::result_type > res; \
|
||||||
typename SK::Intersect_3()(c1,c2,c3,std::back_inserter(res)); \
|
typename SK::Intersect_3()(c1,c2,c3,std::back_inserter(res)); \
|
||||||
return res.size() != 0; }
|
return !res.empty(); }
|
||||||
|
|
||||||
CGAL_SPHERICAL_KERNEL_MACRO_DO_INTERSECTION_3_2(Sphere_3, Line_3)
|
CGAL_SPHERICAL_KERNEL_MACRO_DO_INTERSECTION_3_2(Sphere_3, Line_3)
|
||||||
CGAL_SPHERICAL_KERNEL_MACRO_DO_INTERSECTION_3_2(Line_3, Sphere_3)
|
CGAL_SPHERICAL_KERNEL_MACRO_DO_INTERSECTION_3_2(Line_3, Sphere_3)
|
||||||
|
|
@ -1159,7 +1159,6 @@ template < class SK > \
|
||||||
template < class SK >
|
template < class SK >
|
||||||
class Intersect_3
|
class Intersect_3
|
||||||
{
|
{
|
||||||
|
|
||||||
typedef typename SK::Sphere_3 Sphere_3;
|
typedef typename SK::Sphere_3 Sphere_3;
|
||||||
typedef typename SK::Line_3 Line_3;
|
typedef typename SK::Line_3 Line_3;
|
||||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||||
|
|
@ -1176,7 +1175,7 @@ template < class SK > \
|
||||||
private:
|
private:
|
||||||
// helper to minimize result implementation
|
// helper to minimize result implementation
|
||||||
template <typename A, typename B,
|
template <typename A, typename B,
|
||||||
typename C, bool is_iterator = CGAL::is_iterator<C>::value>
|
typename C, bool is_iterator = CGAL::is_iterator<typename boost::decay<C>::type>::value>
|
||||||
struct result_impl
|
struct result_impl
|
||||||
{ typedef typename boost::result_of<typename SK::Linear_kernel::Intersect_3(A, B, C)>::type
|
{ typedef typename boost::result_of<typename SK::Linear_kernel::Intersect_3(A, B, C)>::type
|
||||||
type; };
|
type; };
|
||||||
|
|
@ -1192,7 +1191,7 @@ template < class SK > \
|
||||||
// the binary overload always goes to Linear::Intersect_3
|
// the binary overload always goes to Linear::Intersect_3
|
||||||
template <typename F, typename A, typename B>
|
template <typename F, typename A, typename B>
|
||||||
struct result<F(A, B)>
|
struct result<F(A, B)>
|
||||||
{ typedef typename boost::result_of<F(A, B)>::type type; };
|
{ typedef typename boost::result_of<typename SK::Linear_kernel::Intersect_3(A, B)>::type type; };
|
||||||
|
|
||||||
// we match the ternary case if the last argument is an iterator,
|
// we match the ternary case if the last argument is an iterator,
|
||||||
// otherwise Linear::Intersect_3 wins
|
// otherwise Linear::Intersect_3 wins
|
||||||
|
|
@ -1209,12 +1208,15 @@ template < class SK > \
|
||||||
template <typename A, typename B>
|
template <typename A, typename B>
|
||||||
typename boost::result_of<typename SK::Intersect_3(A, B)>::type
|
typename boost::result_of<typename SK::Intersect_3(A, B)>::type
|
||||||
operator()(const A& a, const B& b)
|
operator()(const A& a, const B& b)
|
||||||
{ return SK().intersect_3_object()(a, b); }
|
{ return typename SK::Linear_kernel().intersect_3_object()(a, b); }
|
||||||
|
|
||||||
template <typename A, typename B, typename C>
|
template <typename A, typename B, typename C>
|
||||||
typename boost::result_of<typename SK::Intersect_3(A, B, C)>::type
|
typename boost::result_of<typename SK::Intersect_3(A, B, C)>::type
|
||||||
operator()(const A& a, const B& b, const C& c)
|
operator()(const A& a, const B& b, const C& c,
|
||||||
{ return SK().intersect_3_object()(a, b, c); }
|
typename boost::enable_if_c<!(CGAL::is_iterator<typename boost::decay<C>::type>::value)>::type* = 0)
|
||||||
|
{
|
||||||
|
return typename SK::Linear_kernel().intersect_3_object()(a, b, c);
|
||||||
|
}
|
||||||
|
|
||||||
template < class OutputIterator >
|
template < class OutputIterator >
|
||||||
OutputIterator
|
OutputIterator
|
||||||
|
|
|
||||||
|
|
@ -120,7 +120,8 @@ namespace CGAL {
|
||||||
typename SK::FT z_coord=extremal_points_z_coordinate<SK>(circle,sphere);
|
typename SK::FT z_coord=extremal_points_z_coordinate<SK>(circle,sphere);
|
||||||
|
|
||||||
typename SK::Plane_3 plane(0,0,1,-z_coord);
|
typename SK::Plane_3 plane(0,0,1,-z_coord);
|
||||||
std::vector<typename Intersection_traits<SK, typename SK::Circle_3, typename SK::Plane_3>::result_type > inters;
|
std::vector<typename boost::result_of<
|
||||||
|
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Plane_3)>::type > inters;
|
||||||
|
|
||||||
intersect_3<SK>(circle,plane,std::back_inserter(inters));
|
intersect_3<SK>(circle,plane,std::back_inserter(inters));
|
||||||
CGAL_kernel_precondition(inters.size()==2);
|
CGAL_kernel_precondition(inters.size()==2);
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,9 @@ namespace CGAL {
|
||||||
OutputIterator res)
|
OutputIterator res)
|
||||||
{
|
{
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef std::vector<typename Intersection_traits<SK, typename SK::Line_3, typename SK::Circle_3 >::result_type > solutions_container;
|
typedef std::vector<
|
||||||
|
typename boost::result_of<typename SK::Intersect_3(typename SK::Line_3, typename SK::Circle_3 )>::type
|
||||||
|
> solutions_container;
|
||||||
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
||||||
|
|
||||||
solutions_container solutions;
|
solutions_container solutions;
|
||||||
|
|
@ -118,11 +120,13 @@ namespace CGAL {
|
||||||
OutputIterator res)
|
OutputIterator res)
|
||||||
{
|
{
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef typename Intersection_traits<SK, typename SK::Circle_3, typename SK::Circular_arc_3>::result_type
|
typedef typename boost::result_of<
|
||||||
result_type;
|
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Circular_arc_3)
|
||||||
|
>::type result_type;
|
||||||
|
|
||||||
typedef std::vector<typename Intersection_traits<SK, typename SK::Circle_3, typename SK::Circle_3>::result_type>
|
typedef std::vector<typename boost::result_of<
|
||||||
solutions_container;
|
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Circle_3)
|
||||||
|
>::type > solutions_container;
|
||||||
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
||||||
|
|
||||||
if(non_oriented_equal<SK>(c, ca.supporting_circle())) {
|
if(non_oriented_equal<SK>(c, ca.supporting_circle())) {
|
||||||
|
|
@ -155,13 +159,14 @@ namespace CGAL {
|
||||||
const typename SK::Circular_arc_3 & c,
|
const typename SK::Circular_arc_3 & c,
|
||||||
OutputIterator res)
|
OutputIterator res)
|
||||||
{
|
{
|
||||||
typedef typename Intersection_traits<SK, typename SK::Sphere_3, typename SK::Circular_arc_3>::result_type
|
typedef typename boost::result_of<
|
||||||
result_type;
|
typename SK::Intersect_3(typename SK::Sphere_3, typename SK::Circular_arc_3)
|
||||||
|
>::type result_type;
|
||||||
|
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef std::vector<typename Intersection_traits<SK, typename SK::Circle_3,
|
typedef std::vector<typename boost::result_of<
|
||||||
typename SK::Sphere_3>::result_type>
|
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Sphere_3)>::type
|
||||||
solutions_container;
|
> solutions_container;
|
||||||
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
||||||
|
|
||||||
if(SK().has_on_3_object()(s, c.supporting_circle())) {
|
if(SK().has_on_3_object()(s, c.supporting_circle())) {
|
||||||
|
|
@ -194,11 +199,15 @@ namespace CGAL {
|
||||||
const typename SK::Circular_arc_3 & ca,
|
const typename SK::Circular_arc_3 & ca,
|
||||||
OutputIterator res)
|
OutputIterator res)
|
||||||
{
|
{
|
||||||
typedef typename Intersection_traits<SK, typename SK::Plane_3, typename SK::Circular_arc_3>::result_type result_type;
|
typedef typename boost::result_of<
|
||||||
|
typename SK::Intersect_3(typename SK::Plane_3, typename SK::Circular_arc_3)
|
||||||
|
>::type result_type;
|
||||||
typedef typename SK::Point_3 Point_3;
|
typedef typename SK::Point_3 Point_3;
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef std::vector<typename Intersection_traits<SK, typename SK::Circle_3,
|
typedef std::vector<
|
||||||
typename SK::Plane_3>::result_type> solutions_container;
|
typename boost::result_of<typename SK::Intersect_3(typename SK::Circle_3, typename SK::Plane_3)>::type
|
||||||
|
> solutions_container;
|
||||||
|
|
||||||
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
||||||
if(SK().has_on_3_object()(p,ca.supporting_circle())) {
|
if(SK().has_on_3_object()(p,ca.supporting_circle())) {
|
||||||
*res++ = CGAL::internal::intersection_return<SK, typename SK::Plane_3, typename SK::Circular_arc_3>(ca);
|
*res++ = CGAL::internal::intersection_return<SK, typename SK::Plane_3, typename SK::Circular_arc_3>(ca);
|
||||||
|
|
@ -231,7 +240,7 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef std::vector<
|
typedef std::vector<
|
||||||
typename Intersection_traits<SK, typename SK::Line_3, typename SK::Line_3>::result_type>
|
typename boost::result_of<typename SK::Intersect_3(typename SK::Line_3, typename SK::Line_3)>::type>
|
||||||
solutions_container;
|
solutions_container;
|
||||||
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
||||||
|
|
||||||
|
|
@ -264,12 +273,15 @@ namespace CGAL {
|
||||||
const typename SK::Circular_arc_3 & a2,
|
const typename SK::Circular_arc_3 & a2,
|
||||||
OutputIterator res)
|
OutputIterator res)
|
||||||
{
|
{
|
||||||
typedef typename Intersection_traits<SK, typename SK::Circular_arc_3,
|
typedef typename boost::result_of<
|
||||||
typename SK::Circular_arc_3>::result_type result_type;
|
typename SK::Intersect_3(typename SK::Circular_arc_3, typename SK::Circular_arc_3)
|
||||||
|
>::type result_type;
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
typedef typename SK::Circular_arc_3 Circular_arc_3;
|
||||||
typedef std::vector<typename Intersection_traits<SK, typename SK::Circle_3,
|
typedef std::vector< typename boost::result_of<
|
||||||
typename SK::Circle_3 >::result_type> solutions_container;
|
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Circle_3 )
|
||||||
|
>::type> solutions_container;
|
||||||
|
|
||||||
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
||||||
|
|
||||||
if(non_oriented_equal<SK>(a1.supporting_circle(), a2.supporting_circle())) {
|
if(non_oriented_equal<SK>(a1.supporting_circle(), a2.supporting_circle())) {
|
||||||
|
|
@ -415,8 +427,9 @@ namespace CGAL {
|
||||||
|
|
||||||
typename SK::FT z_coord=extremal_points_z_coordinate<SK>(arc.supporting_circle(),sphere);
|
typename SK::FT z_coord=extremal_points_z_coordinate<SK>(arc.supporting_circle(),sphere);
|
||||||
typename SK::Plane_3 plane(0,0,1,-z_coord);
|
typename SK::Plane_3 plane(0,0,1,-z_coord);
|
||||||
std::vector<typename Intersection_traits<SK, typename SK::Plane_3,
|
std::vector<typename boost::result_of<
|
||||||
typename SK::Circular_arc_3>::result_type>
|
typename SK::Intersect_3(typename SK::Plane_3,
|
||||||
|
typename SK::Circular_arc_3)>::type>
|
||||||
inters;
|
inters;
|
||||||
|
|
||||||
intersect_3<SK>(plane,arc,std::back_inserter(inters));
|
intersect_3<SK>(plane,arc,std::back_inserter(inters));
|
||||||
|
|
@ -469,7 +482,9 @@ namespace CGAL {
|
||||||
case NORMAL:{
|
case NORMAL:{
|
||||||
typename SK::FT z_coord=extremal_points_z_coordinate<SK>(arc.supporting_circle(),sphere);
|
typename SK::FT z_coord=extremal_points_z_coordinate<SK>(arc.supporting_circle(),sphere);
|
||||||
typename SK::Plane_3 plane(0,0,1,-z_coord);
|
typename SK::Plane_3 plane(0,0,1,-z_coord);
|
||||||
std::vector<typename Intersection_traits<SK, typename SK::Plane_3, typename SK::Circular_arc_3 >::result_type> inters;
|
std::vector<typename boost::result_of<
|
||||||
|
typename SK::Intersect_3(typename SK::Plane_3, typename SK::Circular_arc_3 )>::type
|
||||||
|
> inters;
|
||||||
|
|
||||||
intersect_3<SK>(plane,arc,std::back_inserter(inters));
|
intersect_3<SK>(plane,arc,std::back_inserter(inters));
|
||||||
|
|
||||||
|
|
@ -594,7 +609,9 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
typename SK::Plane_3 plane(sphere.center(),sphere.center()+m,sphere.center()+typename SK::Vector_3(0,0,1));
|
typename SK::Plane_3 plane(sphere.center(),sphere.center()+m,sphere.center()+typename SK::Vector_3(0,0,1));
|
||||||
|
|
||||||
std::vector<typename Intersection_traits<SK, typename SK::Plane_3, typename SK::Circular_arc_3>::result_type> inters;
|
std::vector<typename boost::result_of<
|
||||||
|
typename SK::Intersect_3(typename SK::Plane_3, typename SK::Circular_arc_3)
|
||||||
|
>::type> inters;
|
||||||
intersect_3<SK>(plane,arc,std::back_inserter(inters));
|
intersect_3<SK>(plane,arc,std::back_inserter(inters));
|
||||||
CGAL_kernel_precondition(!inters.empty());
|
CGAL_kernel_precondition(!inters.empty());
|
||||||
if (inters.size()==1){
|
if (inters.size()==1){
|
||||||
|
|
|
||||||
|
|
@ -86,9 +86,9 @@ namespace CGAL {
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef typename SK::Line_3 Line_3;
|
typedef typename SK::Line_3 Line_3;
|
||||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||||
typedef typename Intersection_traits<SK, Line_arc_3, Line_arc_3>::result_type result_type;
|
typedef typename boost::result_of<typename SK::Intersect_3(Line_arc_3, Line_arc_3)>::type result_type;
|
||||||
|
|
||||||
typename Intersection_traits<SK, Line_3, Line_3>::result_type o =
|
typename boost::result_of<typename SK::Intersect_3(Line_3, Line_3)>::type o =
|
||||||
SK().intersect_3_object()(l1.supporting_line(),
|
SK().intersect_3_object()(l1.supporting_line(),
|
||||||
l2.supporting_line());
|
l2.supporting_line());
|
||||||
|
|
||||||
|
|
@ -153,9 +153,9 @@ namespace CGAL {
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef typename SK::Line_3 Line_3;
|
typedef typename SK::Line_3 Line_3;
|
||||||
typedef typename SK::Line_arc_3 Line_arc_3;
|
typedef typename SK::Line_arc_3 Line_arc_3;
|
||||||
typedef typename Intersection_traits<SK, Line_3, Line_arc_3>::result_type result_type;
|
typedef typename boost::result_of<typename SK::Intersect_3(Line_3, Line_arc_3)>::type result_type;
|
||||||
|
|
||||||
typename Intersection_traits<SK,Line_3, Line_3>::result_type o =
|
typename boost::result_of<typename SK::Intersect_3(Line_3, Line_3)>::type o =
|
||||||
SK().intersect_3_object()(l, la.supporting_line());
|
SK().intersect_3_object()(l, la.supporting_line());
|
||||||
|
|
||||||
if(!o)
|
if(!o)
|
||||||
|
|
@ -179,10 +179,12 @@ namespace CGAL {
|
||||||
OutputIterator res)
|
OutputIterator res)
|
||||||
{
|
{
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef std::vector<typename Intersection_traits<SK, typename SK::Line_3, typename SK::Circle_3>::result_type>
|
typedef std::vector<
|
||||||
solutions_container;
|
typename boost::result_of<typename SK::Intersect_3(typename SK::Line_3, typename SK::Circle_3)
|
||||||
|
>::type> solutions_container;
|
||||||
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
||||||
typedef typename Intersection_traits<SK, typename SK::Circle_3, typename SK::Line_arc_3>::result_type result_type;
|
typedef typename boost::result_of<
|
||||||
|
typename SK::Intersect_3(typename SK::Circle_3, typename SK::Line_arc_3)>::type result_type;
|
||||||
|
|
||||||
solutions_container solutions;
|
solutions_container solutions;
|
||||||
SK().intersect_3_object()(l.supporting_line(), c,
|
SK().intersect_3_object()(l.supporting_line(), c,
|
||||||
|
|
@ -211,8 +213,9 @@ namespace CGAL {
|
||||||
OutputIterator res)
|
OutputIterator res)
|
||||||
{
|
{
|
||||||
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
typedef typename SK::Circular_arc_point_3 Circular_arc_point_3;
|
||||||
typedef std::vector<typename Intersection_traits<SK, typename SK::Line_3,
|
typedef std::vector<typename boost::result_of<
|
||||||
typename SK::Sphere_3>::result_type > solutions_container;
|
typename SK::Intersect_3(typename SK::Line_3,
|
||||||
|
typename SK::Sphere_3)>::type > solutions_container;
|
||||||
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
typedef std::pair<Circular_arc_point_3, unsigned> Solution;
|
||||||
solutions_container solutions;
|
solutions_container solutions;
|
||||||
SK().intersect_3_object()(l.supporting_line(), s,
|
SK().intersect_3_object()(l.supporting_line(), s,
|
||||||
|
|
@ -245,8 +248,8 @@ namespace CGAL {
|
||||||
*res++ = result_type(l);
|
*res++ = result_type(l);
|
||||||
}
|
}
|
||||||
const Point_3* sol;
|
const Point_3* sol;
|
||||||
typename Intersection_traits<SK, typename SK::Plane_3, typename SK::Line_3>
|
typename boost::result_of<typename SK::Intersect_3(typename SK::Plane_3, typename SK::Line_3)>
|
||||||
::result_type o = SK().intersect_3_object()(p,l.supporting_line());
|
::type o = SK().intersect_3_object()(p,l.supporting_line());
|
||||||
|
|
||||||
if(!o)
|
if(!o)
|
||||||
return res;
|
return res;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue