Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] sweep line
- Date: Tue, 31 Jan 2012 17:03:21 +0100
On 01/31/2012 01:40 PM, Winnie Hellmann wrote:
Because the typo is consistently used in the code :)That's why I love auto completion. ;-)
So this leaves me with the question: Can I do a sweep line inside anI want to sort my arrangement vertices by y-coordinate using a sweep
line.
arrangement in y-direction? As far as I have seen the Basic_sweep_line_2
does sweeping in x-direction, but I haven't found any documentation for
this class.
That's doable by providing another model of ArrangementTraits_2 to
handle that. In that traits, you need to define you own functors
Make_x_monotone_2, Compare_x_2 ...
In each functor you can reuse existing implementation and swap usage of
x and y. This is definitely not an easy solution.
The lazy solution is to have a preprocessing step to convert your input
by swapping x and y coordinates of points (and use handmade global
functions get_x(Point_2),get_y(Point_2) to avoid confusion in the rest
of your code).
Sebastien.
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Arrangement_on_surface_2_ref/Concept_ArrangementTraits_2.html
Thanks,
Winnie Hellmann
- [cgal-discuss] sweep line, Winnie Hellmann, 01/30/2012
- Re: [cgal-discuss] sweep line, Sebastien Loriot (GeometryFactory), 01/31/2012
- Re: [cgal-discuss] sweep line, Winnie Hellmann, 01/31/2012
- Re: [cgal-discuss] sweep line, Sebastien Loriot (GeometryFactory), 01/31/2012
- Re: [cgal-discuss] sweep line, Winnie Hellmann, 01/31/2012
- Re: [cgal-discuss] sweep line, Sebastien Loriot (GeometryFactory), 01/31/2012
- Re: [cgal-discuss] sweep line, Winnie Hellmann, 01/31/2012
- Re: [cgal-discuss] sweep line, Sebastien Loriot (GeometryFactory), 01/31/2012
- Re: [cgal-discuss] sweep line, Winnie Hellmann, 01/31/2012
- Re: [cgal-discuss] sweep line, Sebastien Loriot (GeometryFactory), 01/31/2012
- Re: [cgal-discuss] sweep line, Winnie Hellmann, 01/31/2012
- Re: [cgal-discuss] sweep line, Sebastien Loriot (GeometryFactory), 01/31/2012
Archive powered by MHonArc 2.6.16.