Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Re: do_intersect visitor pattern
- Date: Tue, 18 Oct 2011 00:01:00 -0700
Please read again this example:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Box_intersection_d/Chapter_main.html#Section_62.5
First you filter intersection by simply doing Bbox intersections
and then in case of overlap of bboxes YOU call do_intersect.
Note that a axis-aligned bboxes overlap test is simple comparison
of bounds and is really fast.
Sebastien.
On 10/17/2011 11:28 PM, Graviton wrote:
Thanks, but won't that be a bit slow? Because for every intersection,
you need to box_self_intersection_d
<http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Box_intersection_d_ref/Function_box_self_intersection_d.html#Cross_link_anchor_1717>
once,
and then do_intersect a second time, would that means that I am actually
computing the intersection one more time than necessary?
On Tue, Oct 18, 2011 at 2:20 PM, Sebastien Loriot (GeometryFactory) [via
cgal-discuss] <[hidden email]
</user/SendEmail.jtp?type=node&node=3914344&i=0>> wrote:
On 10/17/2011 11:15 PM, Graviton wrote:
> Hello, I read your link, and look back at the do_intersection API, I
> don't think do_intersection actually takes in a functor, just
like how
> box_self_intersection_d
>
<http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Box_intersection_d_ref/Function_box_self_intersection_d.html#Cross_link_anchor_1717>
does.
> Or is it that one needs to use box_self_intersection_d
>
<http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Box_intersection_d_ref/Function_box_self_intersection_d.html#Cross_link_anchor_1717>
in
> this case? But isn't box_self_intersection_d
>
<http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Box_intersection_d_ref/Function_box_self_intersection_d.html#Cross_link_anchor_1717>
is
> supposed to be used for proximity computation, and used when
there are
> complicated geometries?
>
The call to do_intersect must be done by you in the functor.
The functor is called each time the bounding boxes intersect.
Sebastien.
> On Tue, Oct 18, 2011 at 1:13 PM, Sebastien Loriot
(GeometryFactory) [via
> cgal-discuss] <[hidden email]
> </user/SendEmail.jtp?type=node&node=3914328&i=0>> wrote:
>
> Have a look at this chapter:
>
>
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Box_intersection_d/Chapter_main.html
>
> and in particular the following example you can adapt
> to polygon. Note that you can also pass a functor instead
> of a function.
>
>
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Box_intersection_d/Chapter_main.html#Section_62.5
>
>
>
> Sebastien.
>
> On 10/17/2011 07:45 PM, Graviton wrote:
>
> > I have a list of polygons, and I want to check whether any of
> them intersect
> > with others or not ( predicate is sufficient, I just want to know
> whether A
> > polygon intersects with B, that's it).
> >
> > And since I have a list of polygons, I want to use do_intersect
> and I want
> > to keep the index of the intersected polygons. It would be
great if
> > do_intersect also accepts a functor, that is called when an
> intersection
> > happens, so that I can store the index of the polygon somewhere.
> >
> > --
> > View this message in context:
>
http://cgal-discuss.949826.n4.nabble.com/do-intersect-visitor-pattern-tp3914108p3914108.html
> > Sent from the cgal-discuss mailing list archive at Nabble.com.
> >
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
>
>
>
------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
>
http://cgal-discuss.949826.n4.nabble.com/do-intersect-visitor-pattern-tp3914108p3914272.html
>
> To unsubscribe from do_intersect visitor pattern, click here.
>
>
>
>
------------------------------------------------------------------------
> View this message in context: Re: do_intersect visitor pattern
>
<http://cgal-discuss.949826.n4.nabble.com/do-intersect-visitor-pattern-tp3914108p3914328.html>
> Sent from the cgal-discuss mailing list archive
> <http://cgal-discuss.949826.n4.nabble.com/> at Nabble.com.
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
------------------------------------------------------------------------
If you reply to this email, your message will be added to the
discussion below:
http://cgal-discuss.949826.n4.nabble.com/do-intersect-visitor-pattern-tp3914108p3914337.html
To unsubscribe from do_intersect visitor pattern, click here.
------------------------------------------------------------------------
View this message in context: Re: do_intersect visitor pattern
<http://cgal-discuss.949826.n4.nabble.com/do-intersect-visitor-pattern-tp3914108p3914344.html>
Sent from the cgal-discuss mailing list archive
<http://cgal-discuss.949826.n4.nabble.com/> at Nabble.com.
- [cgal-discuss] do_intersect visitor pattern, Graviton, 10/18/2011
- Re: [cgal-discuss] do_intersect visitor pattern, Sebastien Loriot (GeometryFactory), 10/18/2011
- [cgal-discuss] Re: do_intersect visitor pattern, Graviton, 10/18/2011
- Re: [cgal-discuss] Re: do_intersect visitor pattern, Sebastien Loriot (GeometryFactory), 10/18/2011
- [cgal-discuss] Re: do_intersect visitor pattern, Graviton, 10/18/2011
- Re: [cgal-discuss] Re: do_intersect visitor pattern, Sebastien Loriot (GeometryFactory), 10/18/2011
- [cgal-discuss] Re: do_intersect visitor pattern, Graviton, 10/18/2011
- Re: [cgal-discuss] Re: do_intersect visitor pattern, Sebastien Loriot (GeometryFactory), 10/18/2011
- [cgal-discuss] Re: do_intersect visitor pattern, Graviton, 10/18/2011
- Re: [cgal-discuss] do_intersect visitor pattern, Sebastien Loriot (GeometryFactory), 10/18/2011
Archive powered by MHonArc 2.6.16.