Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Check whether two polyhedron_3 are intersection
- Date: Thu, 28 Mar 2013 18:33:14 +0100
- Organization: GeometryFactory
There is a non-documented function in
#include <CGAL/intersection_of_Polyhedra_3.h>
template <typename Polyhedron, typename OutputIterator>
OutputIterator
intersection_Polyhedron_3_Polyhedron_3(const Polyhedron& P, const Polyhedron& Q, OutputIterator out)
computing the intersection of two polyhedra putting into the output iterator vector<Point_3> for each intersecting polyline.
Used together with a output iterator counting the number of item inserted (or directly the size of the container filled), this will
give you an answer.
The fastest runtime solution is to used this package:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Box_intersection_d/Chapter_main.html
and this function:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Box_intersection_d_ref/Function_box_intersection_d.html
and throw an exception in the functor as soon as an intersection is
found.
Sebastien
On 03/28/2013 02:35 PM, scud wrote:
How to check whether two polyhedron_3 are intersection or not efficiently. I
tried to use nef_polyhedron_3, but it is too slow. And I don't need to know
the area of intersection. I am thinking maybe using AABB Tree, but it seems
that I cannot do_intersection two AABB Trees directly. Please give me some
clue.
Thanks
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Check-whether-two-polyhedron-3-are-intersection-tp4657064.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Check whether two polyhedron_3 are intersection, scud, 03/28/2013
- Re: [cgal-discuss] Check whether two polyhedron_3 are intersection, Sebastien Loriot (GeometryFactory), 03/28/2013
Archive powered by MHonArc 2.6.18.