mirror of https://github.com/CGAL/cgal
Merge branch 'Intersections_3-fix_do_intersect_3planes-GF' into Intersections_3-fix_do_intersect_3planes-master-GF
# Conflicts: # Filtered_kernel/include/CGAL/internal/Static_filters/Do_intersect_3.h
This commit is contained in:
commit
f005bd40a4
|
|
@ -1573,9 +1573,9 @@ do_intersect(const Plane_3<R>& plane1, const Plane_3<R>& plane2, const R&)
|
||||||
template <class R>
|
template <class R>
|
||||||
inline bool
|
inline bool
|
||||||
do_intersect(const Plane_3<R> &plane1, const Plane_3<R> &plane2,
|
do_intersect(const Plane_3<R> &plane1, const Plane_3<R> &plane2,
|
||||||
const Plane_3<R> &plane3, const R&)
|
const Plane_3<R> &plane3, const R& r)
|
||||||
{
|
{
|
||||||
return bool(intersection(plane1, plane2, plane3));
|
return bool(intersection(plane1, plane2, plane3, r));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -228,6 +228,7 @@ struct Test {
|
||||||
Pl pl3(0,0,1,0);
|
Pl pl3(0,0,1,0);
|
||||||
|
|
||||||
// Generic intersection.
|
// Generic intersection.
|
||||||
|
assert(CGAL::do_intersect(pl1, pl2, pl3));
|
||||||
CGAL::Object o = CGAL::intersection(pl1, pl2, pl3);
|
CGAL::Object o = CGAL::intersection(pl1, pl2, pl3);
|
||||||
P p;
|
P p;
|
||||||
assert(assign(p, o));
|
assert(assign(p, o));
|
||||||
|
|
@ -236,9 +237,11 @@ struct Test {
|
||||||
// Empty intersection.
|
// Empty intersection.
|
||||||
Pl pl4(1,0,0,1); // pl4 is // to pl1.
|
Pl pl4(1,0,0,1); // pl4 is // to pl1.
|
||||||
|
|
||||||
|
assert(!CGAL::do_intersect(pl1, pl2, pl4));
|
||||||
CGAL::Object o2 = CGAL::intersection(pl1, pl2, pl4);
|
CGAL::Object o2 = CGAL::intersection(pl1, pl2, pl4);
|
||||||
assert(o2.is_empty());
|
assert(o2.is_empty());
|
||||||
|
|
||||||
|
assert(!CGAL::do_intersect(pl1, pl4, pl2));
|
||||||
CGAL::Object o3 = CGAL::intersection(pl1, pl4, pl2);
|
CGAL::Object o3 = CGAL::intersection(pl1, pl4, pl2);
|
||||||
assert(o3.is_empty());
|
assert(o3.is_empty());
|
||||||
|
|
||||||
|
|
@ -246,12 +249,14 @@ struct Test {
|
||||||
Pl pl5(1,1,0,0); // pl1, pl2, pl5 intersect in the line l.
|
Pl pl5(1,1,0,0); // pl1, pl2, pl5 intersect in the line l.
|
||||||
L l;
|
L l;
|
||||||
|
|
||||||
|
assert(CGAL::do_intersect(pl1, pl2, pl5));
|
||||||
CGAL::Object o4 = CGAL::intersection(pl1, pl2, pl5);
|
CGAL::Object o4 = CGAL::intersection(pl1, pl2, pl5);
|
||||||
assert(assign(l, o4));
|
assert(assign(l, o4));
|
||||||
|
|
||||||
assert(l == L(P(0,0,0), P(0,0,1)));
|
assert(l == L(P(0,0,0), P(0,0,1)));
|
||||||
|
|
||||||
// Intersection in a plane.
|
// Intersection in a plane.
|
||||||
|
assert(CGAL::do_intersect(pl1, pl1, pl1));
|
||||||
CGAL::Object o5 = CGAL::intersection(pl1, pl1, pl1);
|
CGAL::Object o5 = CGAL::intersection(pl1, pl1, pl1);
|
||||||
Pl pl;
|
Pl pl;
|
||||||
assert(assign(pl, o5));
|
assert(assign(pl, o5));
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,12 @@ In three-dimensional space, the types `Type1` and
|
||||||
- `Tetrahedron_3<Kernel>`.
|
- `Tetrahedron_3<Kernel>`.
|
||||||
*/
|
*/
|
||||||
bool do_intersect(Type1<Kernel> obj1, Type2<Kernel> obj2);
|
bool do_intersect(Type1<Kernel> obj1, Type2<Kernel> obj2);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
checks whether `obj1`, `obj2` and `obj3` intersect.
|
||||||
|
*/
|
||||||
|
bool do_intersect(Plane_3<Kernel> obj1, Plane_3<Kernel> obj2, Plane_3<Kernel> obj3);
|
||||||
|
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue