Subject: CGAL users discussion list
List archive
[cgal-discuss] Efficient way to test if a set of Segment_2 intersects the interior of a Triangle_2
Chronological Thread
- From: dondaxu <>
- To:
- Subject: [cgal-discuss] Efficient way to test if a set of Segment_2 intersects the interior of a Triangle_2
- Date: Wed, 4 Dec 2013 18:26:10 -0800 (PST)
Hello
I have a large set of Segment_2 and Triangle_2 , what would be the fastest
way to identify which of the triangles has its interior intersected by any
of the segments using CGAL? Currently I insert the segments into the AABB
tree (converted to Segment_3 with z = 0), then for each triangle(converted
to Triangle_3 with z = 0) I get the list of all intersections with
AABB_Tree::all_intersections(triangle) and I check if any of the
intersections is a segment using CGAL::assign(Segment_3, intersection), is
so then the query triangle’s interior is intersected by at least one of the
segments. If the intersection is not a segment, then either the triangle
was never intersected or the intersection was only on the edge of the
triangle. I'm using Exact_predicates_inexact_constructions.
Is there a more efficient way to achieve this?
Thanks!
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Efficient-way-to-test-if-a-set-of-Segment-2-intersects-the-interior-of-a-Triangle-2-tp4658516.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Efficient way to test if a set of Segment_2 intersects the interior of a Triangle_2, dondaxu, 12/05/2013
Archive powered by MHonArc 2.6.18.