mirror of https://github.com/CGAL/cgal
Add Plane/Ray
This commit is contained in:
parent
2e0f01be94
commit
75a2541d12
|
|
@ -523,6 +523,7 @@ do_intersect(const typename K::Segment_3 &s1,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AF: to be fixed
|
||||||
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,
|
||||||
|
|
@ -971,17 +972,14 @@ do_intersect(const typename K::Plane_3 &plane,
|
||||||
{
|
{
|
||||||
typedef typename K::Point_3 Point_3;
|
typedef typename K::Point_3 Point_3;
|
||||||
|
|
||||||
typename Intersection_traits<K, typename K::Plane_3, typename K::Line_3>
|
K::Oriented_side_3 oriented_side_3;
|
||||||
::result_type
|
|
||||||
line_intersection = internal::intersection(plane, ray.supporting_line(), k);
|
|
||||||
|
|
||||||
if(!line_intersection)
|
|
||||||
return false;
|
|
||||||
if(const Point_3 *isp = intersect_get<Point_3>(line_intersection))
|
|
||||||
return ray.collinear_has_on(*isp);
|
|
||||||
|
|
||||||
|
Oriented_side os = oriented_side_3(plane,ray.source());
|
||||||
|
if(os == ON_ORIENTED_BOUNDARY){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
return sign(ray.to_vector()* plane.orthogonal_vector()) * os == -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue