$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
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()); 
        num_points_in_poly=pts.size();
        numpointsperpoly.push_back(num_points_in_poly);
        
        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;
             tempcorner.assign(gtl::x(pts[index]),gtl::y(pts[index]),0);
             unioncorners.push_back(tempcorner);
        }
    }  
Thanks again,
you're a lifesaver.  
-- View this message in context: http://boost.2283326.n4.nabble.com/Polygon-accessing-Points-Data-tp3446015p3447848.html Sent from the Boost - Users mailing list archive at Nabble.com.