Subject: Re: [geometry] access to poligon point list
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2012-05-17 19:40:46
On 17 May 2012 19:23, nicola81 <nicola_cavallini_at_[hidden]> wrote:
> I would like to get the polygon points in a standard vector, or into some
> other (simple :( ) structure I can access to.
Based on your example, is this what you look for?
red = output;
// ring is a vector
std::vector<point> const& points = red.outer();
for (std::vector<point>::size_type i = 0; i < points.size(); ++i)
> I've spent several days trying to get something out of Google, but I
> couldn't get anything useful. I cannot compile most of the code examples on
> stackoverflow or on the geometry library website.
Could you point which examples from the geometry library website
do not compile for you?
> I run the last Intel compiler 12.something, and boost 1.49.
I'd encourage you to try the geometry library for Boost trunk.
> The example I was working on is attached, and is actually from the boost
> website. My guess was trying to get a couple of standard vectors (Px, Py)
> out object function âlist_coordinatesâ.
I have to admit, it is not clear to me what you mean as "get a couple of
standard vectors". But, try my example above and see if this is
what you are looking for.
-- Mateusz Loskot, http://mateusz.loskot.net
Geometry list run by mateusz at loskot.net