Boost logo

Boost Users :

Subject: Re: [Boost-users] Polygon, accessing Points_Data
From: AmandaLind (abl128_at_[hidden])
Date: 2011-04-13 13:51:30

Will the following two lines work if pts are of a vector of Points instead of
an array of points ?

 Point pts2[numcorners2]; //chaged to std::vector pts2;
  gtl::set_points(poly2, pts2, pts2+numcorners2);

And lastly, does anything about the following loop stand out to you as bad
accessing of Polygon points ?

    for(std::size_t i = 0; i < num_polys; ++i)
        pts.insert(pts.end(), polys[i].begin(), polys[i].end());
        for(int index =0; i < num_points_in_poly; index++)
        { std::cout<<" Here are the stubborn points x=
"<<gtl::x(pts[index])<<", y= "<<gtl::y(pts[index])<<std::endl;

Thanks again,
you're a lifesaver.

View this message in context:
Sent from the Boost - Users mailing list archive at

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at