mirror of https://github.com/CGAL/cgal
more clean-up
This commit is contained in:
parent
ce4cbe6d06
commit
fe0d4d0a6e
|
|
@ -350,20 +350,20 @@ intersection(const typename K::Triangle_2 &tr1,
|
||||||
const typename K::Triangle_2 &tr2,
|
const typename K::Triangle_2 &tr2,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef Triangle_2_Triangle_2_pair<K> is_t;
|
typedef Triangle_2_Triangle_2_pair<K> Intersection_type;
|
||||||
is_t ispair(&tr1, &tr2);
|
Intersection_type ispair(&tr1, &tr2);
|
||||||
switch (ispair.intersection_type())
|
switch (ispair.intersection_type())
|
||||||
{
|
{
|
||||||
case is_t::NO_INTERSECTION:
|
case Intersection_type::NO_INTERSECTION:
|
||||||
default:
|
default:
|
||||||
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>();
|
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>();
|
||||||
case is_t::POINT:
|
case Intersection_type::POINT:
|
||||||
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(ispair.intersection_point());
|
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(ispair.intersection_point());
|
||||||
case is_t::SEGMENT:
|
case Intersection_type::SEGMENT:
|
||||||
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(ispair.intersection_segment());
|
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(ispair.intersection_segment());
|
||||||
case is_t::TRIANGLE:
|
case Intersection_type::TRIANGLE:
|
||||||
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(ispair.intersection_triangle());
|
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(ispair.intersection_triangle());
|
||||||
case is_t::POLYGON:
|
case Intersection_type::POLYGON:
|
||||||
{
|
{
|
||||||
typedef std::vector<typename K::Point_2> Container;
|
typedef std::vector<typename K::Point_2> Container;
|
||||||
Container points(ispair.vertex_count());
|
Container points(ispair.vertex_count());
|
||||||
|
|
@ -372,10 +372,7 @@ intersection(const typename K::Triangle_2 &tr1,
|
||||||
|
|
||||||
if(Is_cw<K, typename Algebraic_structure_traits<typename K::FT>::Is_exact>()(points))
|
if(Is_cw<K, typename Algebraic_structure_traits<typename K::FT>::Is_exact>()(points))
|
||||||
{
|
{
|
||||||
std::size_t length = points.size();
|
std::reverse(points.begin(), points.end());
|
||||||
|
|
||||||
for(std::size_t i = 0; i< length/2; ++i)
|
|
||||||
std::swap(points[i], points[length-i-1]);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(points);
|
return intersection_return<typename K::Intersect_2, typename K::Triangle_2, typename K::Triangle_2>(points);
|
||||||
|
|
|
||||||
|
|
@ -173,8 +173,8 @@ struct Intersection_traits<K, typename K::Iso_cuboid_3, CGAL::Bbox_3>
|
||||||
template<typename K>
|
template<typename K>
|
||||||
struct Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Point_3> {
|
struct Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Point_3> {
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3 > variant_type;
|
boost::variant< typename K::Point_3 > variant_type;
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Iso_cuboid_3 Plane_3, variant of 4
|
// Iso_cuboid_3 Plane_3, variant of 4
|
||||||
|
|
@ -182,7 +182,7 @@ template<typename K>
|
||||||
struct Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Plane_3> {
|
struct Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Plane_3> {
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3, typename K::Segment_3,
|
boost::variant< typename K::Point_3, typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
|
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
@ -191,7 +191,7 @@ template<typename K>
|
||||||
struct Intersection_traits<K, typename K::Plane_3, typename K::Iso_cuboid_3> {
|
struct Intersection_traits<K, typename K::Plane_3, typename K::Iso_cuboid_3> {
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3, typename K::Segment_3,
|
boost::variant< typename K::Point_3, typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
|
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
@ -201,7 +201,7 @@ template<typename K>
|
||||||
struct Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Triangle_3> {
|
struct Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Triangle_3> {
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3, typename K::Segment_3,
|
boost::variant< typename K::Point_3, typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
|
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
@ -210,7 +210,7 @@ template<typename K>
|
||||||
struct Intersection_traits<K, typename K::Triangle_3, typename K::Iso_cuboid_3> {
|
struct Intersection_traits<K, typename K::Triangle_3, typename K::Iso_cuboid_3> {
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3, typename K::Segment_3,
|
boost::variant< typename K::Point_3, typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
|
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
@ -220,7 +220,7 @@ template<typename K>
|
||||||
struct Intersection_traits<K, typename CGAL::Bbox_3, typename K::Plane_3> {
|
struct Intersection_traits<K, typename CGAL::Bbox_3, typename K::Plane_3> {
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3, typename K::Segment_3,
|
boost::variant< typename K::Point_3, typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
|
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
@ -229,7 +229,7 @@ template<typename K>
|
||||||
struct Intersection_traits<K, typename K::Plane_3, typename CGAL::Bbox_3> {
|
struct Intersection_traits<K, typename K::Plane_3, typename CGAL::Bbox_3> {
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3, typename K::Segment_3,
|
boost::variant< typename K::Point_3, typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
|
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
@ -239,7 +239,7 @@ template<typename K>
|
||||||
struct Intersection_traits<K, typename CGAL::Bbox_3, typename K::Triangle_3> {
|
struct Intersection_traits<K, typename CGAL::Bbox_3, typename K::Triangle_3> {
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3, typename K::Segment_3,
|
boost::variant< typename K::Point_3, typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
|
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
@ -248,7 +248,7 @@ template<typename K>
|
||||||
struct Intersection_traits<K, typename K::Triangle_3, typename CGAL::Bbox_3> {
|
struct Intersection_traits<K, typename K::Triangle_3, typename CGAL::Bbox_3> {
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3, typename K::Segment_3,
|
boost::variant< typename K::Point_3, typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
|
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
@ -379,7 +379,7 @@ struct Intersection_traits<K, typename K::Tetrahedron_3, typename K::Plane_3>
|
||||||
{
|
{
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3 , typename K::Segment_3,
|
boost::variant< typename K::Point_3 , typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -389,7 +389,7 @@ struct Intersection_traits<K, typename K::Plane_3,typename K::Tetrahedron_3>
|
||||||
{
|
{
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3 , typename K::Segment_3,
|
boost::variant< typename K::Point_3 , typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -399,7 +399,7 @@ struct Intersection_traits<K, typename K::Triangle_3,typename K::Tetrahedron_3>
|
||||||
{
|
{
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3 , typename K::Segment_3,
|
boost::variant< typename K::Point_3 , typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -409,7 +409,7 @@ struct Intersection_traits<K, typename K::Tetrahedron_3,typename K::Triangle_3>
|
||||||
{
|
{
|
||||||
typedef typename
|
typedef typename
|
||||||
boost::variant< typename K::Point_3 , typename K::Segment_3,
|
boost::variant< typename K::Point_3 , typename K::Segment_3,
|
||||||
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
typename K::Triangle_3, std::vector<typename K::Point_3> > variant_type;
|
||||||
typedef typename boost::optional< variant_type > result_type;
|
typedef typename boost::optional< variant_type > result_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -151,8 +151,8 @@ intersection(
|
||||||
case 2: //intersects diagonally
|
case 2: //intersects diagonally
|
||||||
{
|
{
|
||||||
Poly res(4);
|
Poly res(4);
|
||||||
Segment_3 front(segments.front()),
|
Segment_3 &front(segments.front()),
|
||||||
back(segments.back());
|
&back(segments.back());
|
||||||
res[0] = front.target();
|
res[0] = front.target();
|
||||||
res[1] = back.target();
|
res[1] = back.target();
|
||||||
res[2] = back.source();
|
res[2] = back.source();
|
||||||
|
|
@ -311,13 +311,17 @@ intersection(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tmp_segs.size() < 3)
|
if(tmp_segs.size() < 3)
|
||||||
return result_type();
|
return result_type();
|
||||||
|
|
||||||
std::list<Point_3> tmp_pts;
|
std::list<Point_3> tmp_pts;
|
||||||
fill_points_list(tmp_segs,tmp_pts);
|
fill_points_list(tmp_segs,tmp_pts);
|
||||||
|
|
||||||
Poly res;
|
Poly res;
|
||||||
for(const auto& p : tmp_pts)
|
for(const auto& p : tmp_pts)
|
||||||
res.push_back(p);
|
res.push_back(p);
|
||||||
|
|
||||||
if(res.size() == 3){
|
if(res.size() == 3){
|
||||||
typename K::Triangle_3 tr(res[0], res[1], res[2]);
|
typename K::Triangle_3 tr(res[0], res[1], res[2]);
|
||||||
return result_type(std::forward<typename K::Triangle_3>(tr));
|
return result_type(std::forward<typename K::Triangle_3>(tr));
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ struct Tetrahedron_segment_intersection_3
|
||||||
typedef typename K::Segment_3 O;
|
typedef typename K::Segment_3 O;
|
||||||
typedef Tetrahedron_lines_intersection_3_base<K,typename K::Segment_3,
|
typedef Tetrahedron_lines_intersection_3_base<K,typename K::Segment_3,
|
||||||
Tetrahedron_segment_intersection_3<K> > Base;
|
Tetrahedron_segment_intersection_3<K> > Base;
|
||||||
typedef typename Base::Result_type Result_type;
|
typedef typename Base::Result_type result_type;
|
||||||
|
|
||||||
Tetrahedron_segment_intersection_3(const typename K::Tetrahedron_3& tet,
|
Tetrahedron_segment_intersection_3(const typename K::Tetrahedron_3& tet,
|
||||||
const O& o):Base(tet,o) {}
|
const O& o):Base(tet,o) {}
|
||||||
|
|
@ -43,7 +43,7 @@ struct Tetrahedron_segment_intersection_3
|
||||||
if(this->tet.has_on_bounded_side(this->o.source())
|
if(this->tet.has_on_bounded_side(this->o.source())
|
||||||
&& this->tet.has_on_bounded_side(this->o.target())){
|
&& this->tet.has_on_bounded_side(this->o.target())){
|
||||||
typename K::Segment_3 result = this->o;
|
typename K::Segment_3 result = this->o;
|
||||||
this->output = Result_type(std::forward<typename K::Segment_3>(result));
|
this->output = result_type(std::forward<typename K::Segment_3>(result));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -55,12 +55,12 @@ struct Tetrahedron_segment_intersection_3
|
||||||
if(this->tet.has_on_bounded_side(this->o.source()))
|
if(this->tet.has_on_bounded_side(this->o.source()))
|
||||||
{
|
{
|
||||||
typename K::Segment_3 result(this->o.source(), this->res_points.front());
|
typename K::Segment_3 result(this->o.source(), this->res_points.front());
|
||||||
this->output = Result_type(std::forward<typename K::Segment_3>(result));
|
this->output = result_type(std::forward<typename K::Segment_3>(result));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if(this->tet.has_on_bounded_side(this->o.target())){
|
else if(this->tet.has_on_bounded_side(this->o.target())){
|
||||||
typename K::Segment_3 result(this->res_points.front(), this->o.target());
|
typename K::Segment_3 result(this->res_points.front(), this->o.target());
|
||||||
this->output = Result_type(std::forward<typename K::Segment_3>(result));
|
this->output = result_type(std::forward<typename K::Segment_3>(result));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -110,9 +110,8 @@ intersection(
|
||||||
fill_segments_infos(segments,tmp, tr);
|
fill_segments_infos(segments,tmp, tr);
|
||||||
Poly res;
|
Poly res;
|
||||||
res.reserve(4);
|
res.reserve(4);
|
||||||
for( const auto& p : tmp){
|
for(const auto& p : tmp)
|
||||||
res.push_back(p);
|
res.push_back(p);
|
||||||
}
|
|
||||||
return result_type(std::forward<Poly>(res));
|
return result_type(std::forward<Poly>(res));
|
||||||
}
|
}
|
||||||
//else it must be adjacent to an vertex, so we return the point
|
//else it must be adjacent to an vertex, so we return the point
|
||||||
|
|
@ -238,7 +237,8 @@ intersection(
|
||||||
Poly res;
|
Poly res;
|
||||||
res.reserve(4);
|
res.reserve(4);
|
||||||
res.push_back(inside_points.front());
|
res.push_back(inside_points.front());
|
||||||
for( const auto& p : tmp){res.push_back(p);}
|
for(const auto& p : tmp)
|
||||||
|
res.push_back(p);
|
||||||
return result_type(std::forward<Poly>(res));
|
return result_type(std::forward<Poly>(res));
|
||||||
}
|
}
|
||||||
else //size 2
|
else //size 2
|
||||||
|
|
@ -256,7 +256,8 @@ intersection(
|
||||||
res.push_back(inside_points.front());
|
res.push_back(inside_points.front());
|
||||||
}
|
}
|
||||||
res.push_back(inside_points.back());
|
res.push_back(inside_points.back());
|
||||||
for( const auto& p : tmp){res.push_back(p);}
|
for(const auto& p : tmp)
|
||||||
|
res.push_back(p);
|
||||||
return result_type(std::forward<Poly>(res));
|
return result_type(std::forward<Poly>(res));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,8 @@ namespace internal {
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
|
typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
|
||||||
intersection(const typename K::Plane_3 &plane,
|
intersection(const typename K::Plane_3 &plane,
|
||||||
const typename K::Line_3 &line,
|
const typename K::Line_3 &line,
|
||||||
const K& /*k*/)
|
const K& /*k*/)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
@ -116,8 +116,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
|
typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
|
||||||
intersection(const typename K::Line_3 &line,
|
intersection(const typename K::Line_3 &line,
|
||||||
const typename K::Plane_3 &plane,
|
const typename K::Plane_3 &plane,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(plane, line, k);
|
return intersection(plane, line, k);
|
||||||
}
|
}
|
||||||
|
|
@ -125,8 +125,8 @@ intersection(const typename K::Line_3 &line,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Plane_3, typename K::Plane_3>::result_type
|
typename Intersection_traits<K, typename K::Plane_3, typename K::Plane_3>::result_type
|
||||||
intersection(const typename K::Plane_3 &plane1,
|
intersection(const typename K::Plane_3 &plane1,
|
||||||
const typename K::Plane_3 &plane2,
|
const typename K::Plane_3 &plane2,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
@ -187,9 +187,9 @@ boost::optional< boost::variant<typename K::Point_3,
|
||||||
typename K::Line_3,
|
typename K::Line_3,
|
||||||
typename K::Plane_3> >
|
typename K::Plane_3> >
|
||||||
intersection(const typename K::Plane_3 &plane1,
|
intersection(const typename K::Plane_3 &plane1,
|
||||||
const typename K::Plane_3 &plane2,
|
const typename K::Plane_3 &plane2,
|
||||||
const typename K::Plane_3 &plane3,
|
const typename K::Plane_3 &plane3,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
typedef
|
typedef
|
||||||
typename boost::optional<
|
typename boost::optional<
|
||||||
|
|
@ -238,8 +238,8 @@ intersection(const typename K::Plane_3 &plane1,
|
||||||
template <class K>
|
template <class K>
|
||||||
bool
|
bool
|
||||||
do_intersect(const typename K::Plane_3 &plane,
|
do_intersect(const typename K::Plane_3 &plane,
|
||||||
const typename K::Line_3 &line,
|
const typename K::Line_3 &line,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
@ -266,8 +266,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
bool
|
bool
|
||||||
do_intersect(const typename K::Line_3 &line,
|
do_intersect(const typename K::Line_3 &line,
|
||||||
const typename K::Plane_3 &plane,
|
const typename K::Plane_3 &plane,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return do_intersect(plane, line, k);
|
return do_intersect(plane, line, k);
|
||||||
}
|
}
|
||||||
|
|
@ -275,8 +275,8 @@ do_intersect(const typename K::Line_3 &line,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::result_type
|
typename Intersection_traits<K, typename K::Line_3, typename K::Line_3>::result_type
|
||||||
intersection(const typename K::Line_3 &l1,
|
intersection(const typename K::Line_3 &l1,
|
||||||
const typename K::Line_3 &l2,
|
const typename K::Line_3 &l2,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::FT FT;
|
typedef typename K::FT FT;
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
|
|
@ -313,8 +313,8 @@ intersection(const typename K::Line_3 &l1,
|
||||||
template <class K>
|
template <class K>
|
||||||
bool
|
bool
|
||||||
do_intersect(const typename K::Line_3 &l1,
|
do_intersect(const typename K::Line_3 &l1,
|
||||||
const typename K::Line_3 &l2,
|
const typename K::Line_3 &l2,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
@ -400,8 +400,8 @@ struct L_p_visitor : public boost::static_visitor<
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Segment_3, typename K::Segment_3>::result_type
|
typename Intersection_traits<K, typename K::Segment_3, typename K::Segment_3>::result_type
|
||||||
intersection(const typename K::Segment_3 &s1,
|
intersection(const typename K::Segment_3 &s1,
|
||||||
const typename K::Segment_3 &s2,
|
const typename K::Segment_3 &s2,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
CGAL_precondition(! s1.is_degenerate () && ! s2.is_degenerate () );
|
CGAL_precondition(! s1.is_degenerate () && ! s2.is_degenerate () );
|
||||||
|
|
||||||
|
|
@ -450,8 +450,8 @@ do_intersect(const typename K::Segment_3 &s1,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::result_type
|
typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::result_type
|
||||||
intersection(const typename K::Line_3 &l,
|
intersection(const typename K::Line_3 &l,
|
||||||
const typename K::Segment_3 &s,
|
const typename K::Segment_3 &s,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
CGAL_precondition(! l.is_degenerate () && ! s.is_degenerate () );
|
CGAL_precondition(! l.is_degenerate () && ! s.is_degenerate () );
|
||||||
|
|
||||||
|
|
@ -474,8 +474,8 @@ intersection(const typename K::Line_3 &l,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::result_type
|
typename Intersection_traits<K, typename K::Line_3, typename K::Segment_3>::result_type
|
||||||
intersection(const typename K::Segment_3 &s,
|
intersection(const typename K::Segment_3 &s,
|
||||||
const typename K::Line_3 &l,
|
const typename K::Line_3 &l,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(l,s,k);
|
return intersection(l,s,k);
|
||||||
}
|
}
|
||||||
|
|
@ -519,8 +519,8 @@ template <class K>
|
||||||
bool
|
bool
|
||||||
Ray_3_has_on_collinear_Point_3(
|
Ray_3_has_on_collinear_Point_3(
|
||||||
const typename K::Ray_3 &r,
|
const typename K::Ray_3 &r,
|
||||||
const typename K::Point_3 &p,
|
const typename K::Point_3 &p,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
k.equal_3_object()(r.source(),p)
|
k.equal_3_object()(r.source(),p)
|
||||||
|
|
@ -534,8 +534,8 @@ Ray_3_has_on_collinear_Point_3(
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Line_3, typename K::Ray_3>::result_type
|
typename Intersection_traits<K, typename K::Line_3, typename K::Ray_3>::result_type
|
||||||
intersection(const typename K::Line_3 &l,
|
intersection(const typename K::Line_3 &l,
|
||||||
const typename K::Ray_3 &r,
|
const typename K::Ray_3 &r,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
CGAL_precondition(! l.is_degenerate () && ! r.is_degenerate () );
|
CGAL_precondition(! l.is_degenerate () && ! r.is_degenerate () );
|
||||||
|
|
||||||
|
|
@ -556,8 +556,8 @@ intersection(const typename K::Line_3 &l,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Ray_3, typename K::Line_3>::result_type
|
typename Intersection_traits<K, typename K::Ray_3, typename K::Line_3>::result_type
|
||||||
intersection(const typename K::Ray_3 &r,
|
intersection(const typename K::Ray_3 &r,
|
||||||
const typename K::Line_3 &l,
|
const typename K::Line_3 &l,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(l,r,k);
|
return intersection(l,r,k);
|
||||||
}
|
}
|
||||||
|
|
@ -593,8 +593,8 @@ do_intersect(const typename K::Ray_3 &r,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Segment_3, typename K::Ray_3>::result_type
|
typename Intersection_traits<K, typename K::Segment_3, typename K::Ray_3>::result_type
|
||||||
intersection(const typename K::Segment_3 &s,
|
intersection(const typename K::Segment_3 &s,
|
||||||
const typename K::Ray_3 &r,
|
const typename K::Ray_3 &r,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
CGAL_precondition(! s.is_degenerate () && ! r.is_degenerate () );
|
CGAL_precondition(! s.is_degenerate () && ! r.is_degenerate () );
|
||||||
|
|
||||||
|
|
@ -638,8 +638,8 @@ intersection(const typename K::Segment_3 &s,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Ray_3, typename K::Segment_3>::result_type
|
typename Intersection_traits<K, typename K::Ray_3, typename K::Segment_3>::result_type
|
||||||
intersection(const typename K::Ray_3 &r,
|
intersection(const typename K::Ray_3 &r,
|
||||||
const typename K::Segment_3 &s,
|
const typename K::Segment_3 &s,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(s,r,k);
|
return intersection(s,r,k);
|
||||||
}
|
}
|
||||||
|
|
@ -681,8 +681,8 @@ do_intersect(const typename K::Ray_3 &r,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Ray_3, typename K::Ray_3>::result_type
|
typename Intersection_traits<K, typename K::Ray_3, typename K::Ray_3>::result_type
|
||||||
intersection(const typename K::Ray_3 &r1,
|
intersection(const typename K::Ray_3 &r1,
|
||||||
const typename K::Ray_3 &r2,
|
const typename K::Ray_3 &r2,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
CGAL_precondition(! r1.is_degenerate () && ! r2.is_degenerate () );
|
CGAL_precondition(! r1.is_degenerate () && ! r2.is_degenerate () );
|
||||||
|
|
||||||
|
|
@ -852,8 +852,8 @@ do_intersect(const typename K::Sphere_3 &s1,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Plane_3, typename K::Ray_3>::result_type
|
typename Intersection_traits<K, typename K::Plane_3, typename K::Ray_3>::result_type
|
||||||
intersection(const typename K::Plane_3 &plane,
|
intersection(const typename K::Plane_3 &plane,
|
||||||
const typename K::Ray_3 &ray,
|
const typename K::Ray_3 &ray,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
|
|
||||||
|
|
@ -879,8 +879,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, typename K::Ray_3, typename K::Plane_3>::result_type
|
typename Intersection_traits<K, typename K::Ray_3, typename K::Plane_3>::result_type
|
||||||
intersection(const typename K::Ray_3 &ray,
|
intersection(const typename K::Ray_3 &ray,
|
||||||
const typename K::Plane_3 &plane,
|
const typename K::Plane_3 &plane,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(plane, ray, k);
|
return intersection(plane, ray, k);
|
||||||
}
|
}
|
||||||
|
|
@ -890,8 +890,8 @@ intersection(const typename K::Ray_3 &ray,
|
||||||
template <class K>
|
template <class K>
|
||||||
bool
|
bool
|
||||||
do_intersect(const typename K::Plane_3 &plane,
|
do_intersect(const typename K::Plane_3 &plane,
|
||||||
const typename K::Ray_3 &ray,
|
const typename K::Ray_3 &ray,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
|
|
||||||
|
|
@ -912,8 +912,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
bool
|
bool
|
||||||
do_intersect(const typename K::Ray_3 &ray,
|
do_intersect(const typename K::Ray_3 &ray,
|
||||||
const typename K::Plane_3 &plane,
|
const typename K::Plane_3 &plane,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return do_intersect(plane, ray, k);
|
return do_intersect(plane, ray, k);
|
||||||
}
|
}
|
||||||
|
|
@ -922,8 +922,8 @@ do_intersect(const typename K::Ray_3 &ray,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Plane_3, typename K::Segment_3>::result_type
|
typename Intersection_traits<K, typename K::Plane_3, typename K::Segment_3>::result_type
|
||||||
intersection(const typename K::Plane_3 &plane,
|
intersection(const typename K::Plane_3 &plane,
|
||||||
const typename K::Segment_3 &seg,
|
const typename K::Segment_3 &seg,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
const Point_3 &source = seg.source();
|
const Point_3 &source = seg.source();
|
||||||
|
|
@ -996,8 +996,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, typename K::Segment_3, typename K::Plane_3>::result_type
|
typename Intersection_traits<K, typename K::Segment_3, typename K::Plane_3>::result_type
|
||||||
intersection(const typename K::Segment_3 &seg,
|
intersection(const typename K::Segment_3 &seg,
|
||||||
const typename K::Plane_3 &plane,
|
const typename K::Plane_3 &plane,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(plane, seg, k);
|
return intersection(plane, seg, k);
|
||||||
}
|
}
|
||||||
|
|
@ -1006,8 +1006,8 @@ intersection(const typename K::Segment_3 &seg,
|
||||||
template <class K>
|
template <class K>
|
||||||
bool
|
bool
|
||||||
do_intersect(const typename K::Plane_3 &plane,
|
do_intersect(const typename K::Plane_3 &plane,
|
||||||
const typename K::Segment_3 &seg,
|
const typename K::Segment_3 &seg,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
const Point_3 &source = seg.source();
|
const Point_3 &source = seg.source();
|
||||||
|
|
@ -1028,8 +1028,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
bool
|
bool
|
||||||
do_intersect(const typename K::Segment_3 &seg,
|
do_intersect(const typename K::Segment_3 &seg,
|
||||||
const typename K::Plane_3 &plane,
|
const typename K::Plane_3 &plane,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return do_intersect(plane, seg, k);
|
return do_intersect(plane, seg, k);
|
||||||
}
|
}
|
||||||
|
|
@ -1038,8 +1038,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, typename K::Plane_3, typename K::Triangle_3>::result_type
|
typename Intersection_traits<K, typename K::Plane_3, typename K::Triangle_3>::result_type
|
||||||
intersection(const typename K::Plane_3 &plane,
|
intersection(const typename K::Plane_3 &plane,
|
||||||
const typename K::Triangle_3 &tri,
|
const typename K::Triangle_3 &tri,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
typedef
|
typedef
|
||||||
typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
|
typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>::result_type
|
||||||
|
|
@ -1139,8 +1139,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, typename K::Triangle_3, typename K::Plane_3>::result_type
|
typename Intersection_traits<K, typename K::Triangle_3, typename K::Plane_3>::result_type
|
||||||
intersection(const typename K::Triangle_3 &triangle,
|
intersection(const typename K::Triangle_3 &triangle,
|
||||||
const typename K::Plane_3 &plane,
|
const typename K::Plane_3 &plane,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(plane, triangle, k);
|
return intersection(plane, triangle, k);
|
||||||
}
|
}
|
||||||
|
|
@ -1148,8 +1148,8 @@ intersection(const typename K::Triangle_3 &triangle,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Line_3, Bbox_3>::result_type
|
typename Intersection_traits<K, typename K::Line_3, Bbox_3>::result_type
|
||||||
intersection(const typename K::Line_3 &line,
|
intersection(const typename K::Line_3 &line,
|
||||||
const Bbox_3 &box,
|
const Bbox_3 &box,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
@ -1171,8 +1171,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, Bbox_3, typename K::Line_3>::result_type
|
typename Intersection_traits<K, Bbox_3, typename K::Line_3>::result_type
|
||||||
intersection(const Bbox_3 &box,
|
intersection(const Bbox_3 &box,
|
||||||
const typename K::Line_3 &line,
|
const typename K::Line_3 &line,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(line, box, k);
|
return intersection(line, box, k);
|
||||||
}
|
}
|
||||||
|
|
@ -1181,8 +1181,8 @@ intersection(const Bbox_3 &box,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Ray_3, Bbox_3>::result_type
|
typename Intersection_traits<K, typename K::Ray_3, Bbox_3>::result_type
|
||||||
intersection(const typename K::Ray_3 &ray,
|
intersection(const typename K::Ray_3 &ray,
|
||||||
const Bbox_3 &box,
|
const Bbox_3 &box,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Direction_3 Direction_3;
|
typedef typename K::Direction_3 Direction_3;
|
||||||
|
|
@ -1204,8 +1204,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, Bbox_3, typename K::Ray_3>::result_type
|
typename Intersection_traits<K, Bbox_3, typename K::Ray_3>::result_type
|
||||||
intersection(const Bbox_3 &box,
|
intersection(const Bbox_3 &box,
|
||||||
const typename K::Ray_3 &ray,
|
const typename K::Ray_3 &ray,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(ray, box, k);
|
return intersection(ray, box, k);
|
||||||
}
|
}
|
||||||
|
|
@ -1215,8 +1215,8 @@ intersection(const Bbox_3 &box,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Segment_3, Bbox_3>::result_type
|
typename Intersection_traits<K, typename K::Segment_3, Bbox_3>::result_type
|
||||||
intersection(const typename K::Segment_3 &seg,
|
intersection(const typename K::Segment_3 &seg,
|
||||||
const Bbox_3 &box,
|
const Bbox_3 &box,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
@ -1238,8 +1238,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, Bbox_3, typename K::Segment_3>::result_type
|
typename Intersection_traits<K, Bbox_3, typename K::Segment_3>::result_type
|
||||||
intersection(const Bbox_3 &box,
|
intersection(const Bbox_3 &box,
|
||||||
const typename K::Segment_3 &seg,
|
const typename K::Segment_3 &seg,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(seg, box, k);
|
return intersection(seg, box, k);
|
||||||
}
|
}
|
||||||
|
|
@ -1248,8 +1248,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, Bbox_3, Bbox_3>::result_type
|
typename Intersection_traits<K, Bbox_3, Bbox_3>::result_type
|
||||||
intersection(const Bbox_3 &a,
|
intersection(const Bbox_3 &a,
|
||||||
const Bbox_3 &b,
|
const Bbox_3 &b,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
return CGAL::intersection<K>(a, b);
|
return CGAL::intersection<K>(a, b);
|
||||||
}
|
}
|
||||||
|
|
@ -1257,8 +1257,8 @@ intersection(const Bbox_3 &a,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, CGAL::Bbox_3, typename K::Iso_cuboid_3>::result_type
|
typename Intersection_traits<K, CGAL::Bbox_3, typename K::Iso_cuboid_3>::result_type
|
||||||
intersection(const CGAL::Bbox_3 &box,
|
intersection(const CGAL::Bbox_3 &box,
|
||||||
const typename K::Iso_cuboid_3 &cub,
|
const typename K::Iso_cuboid_3 &cub,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typename K::Iso_cuboid_3 iso_cub(box);
|
typename K::Iso_cuboid_3 iso_cub(box);
|
||||||
return intersection(iso_cub, cub);
|
return intersection(iso_cub, cub);
|
||||||
|
|
@ -1269,8 +1269,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, typename K::Iso_cuboid_3, CGAL::Bbox_3>::result_type
|
typename Intersection_traits<K, typename K::Iso_cuboid_3, CGAL::Bbox_3>::result_type
|
||||||
intersection(const typename K::Iso_cuboid_3 &cub,
|
intersection(const typename K::Iso_cuboid_3 &cub,
|
||||||
const CGAL::Bbox_3 &box,
|
const CGAL::Bbox_3 &box,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(box,cub, k);
|
return intersection(box,cub, k);
|
||||||
}
|
}
|
||||||
|
|
@ -1279,8 +1279,8 @@ intersection(const typename K::Iso_cuboid_3 &cub,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Line_3, typename K::Iso_cuboid_3>::result_type
|
typename Intersection_traits<K, typename K::Line_3, typename K::Iso_cuboid_3>::result_type
|
||||||
intersection(const typename K::Line_3 &line,
|
intersection(const typename K::Line_3 &line,
|
||||||
const typename K::Iso_cuboid_3 &box,
|
const typename K::Iso_cuboid_3 &box,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
@ -1341,8 +1341,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Line_3>::result_type
|
typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Line_3>::result_type
|
||||||
intersection(const typename K::Iso_cuboid_3 &box,
|
intersection(const typename K::Iso_cuboid_3 &box,
|
||||||
const typename K::Line_3 &line,
|
const typename K::Line_3 &line,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(line, box, k);
|
return intersection(line, box, k);
|
||||||
}
|
}
|
||||||
|
|
@ -1352,8 +1352,8 @@ intersection(const typename K::Iso_cuboid_3 &box,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Ray_3, typename K::Iso_cuboid_3>::result_type
|
typename Intersection_traits<K, typename K::Ray_3, typename K::Iso_cuboid_3>::result_type
|
||||||
intersection(const typename K::Ray_3 &ray,
|
intersection(const typename K::Ray_3 &ray,
|
||||||
const typename K::Iso_cuboid_3 &box,
|
const typename K::Iso_cuboid_3 &box,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
@ -1413,8 +1413,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Ray_3>::result_type
|
typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Ray_3>::result_type
|
||||||
intersection(const typename K::Iso_cuboid_3 &box,
|
intersection(const typename K::Iso_cuboid_3 &box,
|
||||||
const typename K::Ray_3 &ray,
|
const typename K::Ray_3 &ray,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(ray, box, k);
|
return intersection(ray, box, k);
|
||||||
}
|
}
|
||||||
|
|
@ -1423,8 +1423,8 @@ intersection(const typename K::Iso_cuboid_3 &box,
|
||||||
template <class K>
|
template <class K>
|
||||||
typename Intersection_traits<K, typename K::Segment_3, typename K::Iso_cuboid_3>::result_type
|
typename Intersection_traits<K, typename K::Segment_3, typename K::Iso_cuboid_3>::result_type
|
||||||
intersection(const typename K::Segment_3 &seg,
|
intersection(const typename K::Segment_3 &seg,
|
||||||
const typename K::Iso_cuboid_3 &box,
|
const typename K::Iso_cuboid_3 &box,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
typedef typename K::Vector_3 Vector_3;
|
typedef typename K::Vector_3 Vector_3;
|
||||||
|
|
@ -1485,8 +1485,8 @@ template <class K>
|
||||||
inline
|
inline
|
||||||
typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Segment_3>::result_type
|
typename Intersection_traits<K, typename K::Iso_cuboid_3, typename K::Segment_3>::result_type
|
||||||
intersection(const typename K::Iso_cuboid_3 &box,
|
intersection(const typename K::Iso_cuboid_3 &box,
|
||||||
const typename K::Segment_3 &seg,
|
const typename K::Segment_3 &seg,
|
||||||
const K& k)
|
const K& k)
|
||||||
{
|
{
|
||||||
return intersection(seg, box, k);
|
return intersection(seg, box, k);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ void fill_segments_infos(std::vector<Segment>& segments,
|
||||||
|
|
||||||
std::vector<Wrapped_segment> wrapped_segments;
|
std::vector<Wrapped_segment> wrapped_segments;
|
||||||
|
|
||||||
for(const auto& s:segments)
|
for(const Segment& s:segments)
|
||||||
wrapped_segments.push_back(Wrapped_segment(s));
|
wrapped_segments.push_back(Wrapped_segment(s));
|
||||||
|
|
||||||
std::vector<Segment> bis = segments;
|
std::vector<Segment> bis = segments;
|
||||||
|
|
|
||||||
|
|
@ -720,7 +720,7 @@ struct Test {
|
||||||
const std::vector<P>* poly = boost::get<std::vector<P> >(&*res);
|
const std::vector<P>* poly = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(poly != nullptr);
|
CGAL_assertion(poly != nullptr);
|
||||||
CGAL_assertion(poly->size() == 4);
|
CGAL_assertion(poly->size() == 4);
|
||||||
for(auto p : *poly)
|
for(auto& p : *poly)
|
||||||
{
|
{
|
||||||
CGAL_assertion(tet.has_on_boundary(p) && tr.has_on(p));
|
CGAL_assertion(tet.has_on_boundary(p) && tr.has_on(p));
|
||||||
}
|
}
|
||||||
|
|
@ -773,7 +773,7 @@ struct Test {
|
||||||
std::vector<P>* inter = boost::get<std::vector<P> >(&*res);
|
std::vector<P>* inter = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(inter != nullptr);
|
CGAL_assertion(inter != nullptr);
|
||||||
CGAL_assertion(inter->size() == 4);
|
CGAL_assertion(inter->size() == 4);
|
||||||
for(auto p : *inter)
|
for(auto& p : *inter)
|
||||||
{
|
{
|
||||||
CGAL_assertion(tet.has_on_boundary(p) && tr.has_on(p));
|
CGAL_assertion(tet.has_on_boundary(p) && tr.has_on(p));
|
||||||
}
|
}
|
||||||
|
|
@ -788,7 +788,7 @@ struct Test {
|
||||||
inter = boost::get<std::vector<P> >(&*res);
|
inter = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(inter != nullptr);
|
CGAL_assertion(inter != nullptr);
|
||||||
CGAL_assertion(inter->size() == 4);
|
CGAL_assertion(inter->size() == 4);
|
||||||
for(auto p : *inter)
|
for(auto& p : *inter)
|
||||||
{
|
{
|
||||||
CGAL_assertion(tet.has_on_boundary(p) && tr.has_on(p));
|
CGAL_assertion(tet.has_on_boundary(p) && tr.has_on(p));
|
||||||
}
|
}
|
||||||
|
|
@ -823,7 +823,7 @@ struct Test {
|
||||||
CGAL_assertion(inter != nullptr);
|
CGAL_assertion(inter != nullptr);
|
||||||
CGAL_assertion(inter->size() == 4);
|
CGAL_assertion(inter->size() == 4);
|
||||||
|
|
||||||
for(auto p : *inter)
|
for(auto& p : *inter)
|
||||||
{
|
{
|
||||||
CGAL_assertion(
|
CGAL_assertion(
|
||||||
(tet.has_on_bounded_side(p) || tet.has_on_boundary(p))
|
(tet.has_on_bounded_side(p) || tet.has_on_boundary(p))
|
||||||
|
|
@ -914,7 +914,7 @@ struct Test {
|
||||||
const std::vector<P>* poly = boost::get<std::vector<P> >(&*res);
|
const std::vector<P>* poly = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(poly != nullptr);
|
CGAL_assertion(poly != nullptr);
|
||||||
CGAL_assertion(poly->size() == 4);
|
CGAL_assertion(poly->size() == 4);
|
||||||
for(auto p : *poly)
|
for(auto& p : *poly)
|
||||||
{
|
{
|
||||||
CGAL_assertion(p.x() == 1);
|
CGAL_assertion(p.x() == 1);
|
||||||
}
|
}
|
||||||
|
|
@ -922,7 +922,7 @@ struct Test {
|
||||||
poly = boost::get<std::vector<P> >(&*res);
|
poly = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(poly != nullptr);
|
CGAL_assertion(poly != nullptr);
|
||||||
CGAL_assertion(poly->size() == 4);
|
CGAL_assertion(poly->size() == 4);
|
||||||
for(auto p : *poly)
|
for(auto& p : *poly)
|
||||||
{
|
{
|
||||||
CGAL_assertion(cub.has_on_boundary(p));
|
CGAL_assertion(cub.has_on_boundary(p));
|
||||||
}
|
}
|
||||||
|
|
@ -945,7 +945,7 @@ struct Test {
|
||||||
poly = boost::get<std::vector<P> >(&*res);
|
poly = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(poly != nullptr);
|
CGAL_assertion(poly != nullptr);
|
||||||
CGAL_assertion(poly->size() == 4);
|
CGAL_assertion(poly->size() == 4);
|
||||||
for(auto p : *poly)
|
for(auto& p : *poly)
|
||||||
{
|
{
|
||||||
CGAL_assertion(pl.has_on(p) && cub.has_on_boundary(p));
|
CGAL_assertion(pl.has_on(p) && cub.has_on_boundary(p));
|
||||||
}
|
}
|
||||||
|
|
@ -956,7 +956,7 @@ struct Test {
|
||||||
poly = boost::get<std::vector<P> >(&*res);
|
poly = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(poly != nullptr);
|
CGAL_assertion(poly != nullptr);
|
||||||
CGAL_assertion(poly->size() == 5);
|
CGAL_assertion(poly->size() == 5);
|
||||||
for(auto p : *poly)
|
for(auto& p : *poly)
|
||||||
{
|
{
|
||||||
CGAL_assertion(pl.has_on(p) && cub.has_on_boundary(p));
|
CGAL_assertion(pl.has_on(p) && cub.has_on_boundary(p));
|
||||||
}
|
}
|
||||||
|
|
@ -1105,7 +1105,7 @@ struct Test {
|
||||||
const std::vector<P>* poly = boost::get<std::vector<P> >(&*res);
|
const std::vector<P>* poly = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(poly != nullptr);
|
CGAL_assertion(poly != nullptr);
|
||||||
CGAL_assertion(poly->size() == 4);
|
CGAL_assertion(poly->size() == 4);
|
||||||
for(auto p : *poly)
|
for(auto& p : *poly)
|
||||||
{
|
{
|
||||||
CGAL_assertion(p.x() == 1);
|
CGAL_assertion(p.x() == 1);
|
||||||
}
|
}
|
||||||
|
|
@ -1131,7 +1131,7 @@ struct Test {
|
||||||
poly = boost::get<std::vector<P> >(&*res);
|
poly = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(poly != nullptr);
|
CGAL_assertion(poly != nullptr);
|
||||||
CGAL_assertion(poly->size() == 5);
|
CGAL_assertion(poly->size() == 5);
|
||||||
for(auto p : *poly)
|
for(auto& p : *poly)
|
||||||
{
|
{
|
||||||
CGAL_assertion(pl.has_on(p));
|
CGAL_assertion(pl.has_on(p));
|
||||||
}
|
}
|
||||||
|
|
@ -1184,7 +1184,7 @@ struct Test {
|
||||||
std::vector<P>* poly = boost::get<std::vector<P> >(&*res);
|
std::vector<P>* poly = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(poly != nullptr);
|
CGAL_assertion(poly != nullptr);
|
||||||
CGAL_assertion(poly->size() == 4);
|
CGAL_assertion(poly->size() == 4);
|
||||||
for(auto p : *poly)
|
for(auto& p : *poly)
|
||||||
{
|
{
|
||||||
CGAL_assertion(tr.has_on(p) && cub.has_on_boundary(p));
|
CGAL_assertion(tr.has_on(p) && cub.has_on_boundary(p));
|
||||||
}
|
}
|
||||||
|
|
@ -1212,7 +1212,7 @@ struct Test {
|
||||||
std::vector<P>* poly = boost::get<std::vector<P> >(&*res);
|
std::vector<P>* poly = boost::get<std::vector<P> >(&*res);
|
||||||
CGAL_assertion(poly != nullptr);
|
CGAL_assertion(poly != nullptr);
|
||||||
CGAL_assertion(poly->size() == 4);
|
CGAL_assertion(poly->size() == 4);
|
||||||
for(auto p : *poly)
|
for(auto& p : *poly)
|
||||||
{
|
{
|
||||||
CGAL_assertion(tr.has_on(p) && cub.has_on_boundary(p));
|
CGAL_assertion(tr.has_on(p) && cub.has_on_boundary(p));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue