I am new to the general geometry library, which is suggested for inclusion with boost:
http:
I have two vectors vector<int> Xb, Yb from which I am trying to create a polygon. I am trying to get something according to the following code snippet:
polygon_2d P; vector<double>::const_iterator xi; vector<double>::const_iterator yi; for (xi=Xb.begin(), yi=Yb.begin(); xi!=Xb.end(); ++xi, ++yi) P.push_back (make<point_2d>(*xi, *yi));
The above code does not work, complaining that P does not have a push_back member function. How to initialize a polygon from points with coordinates vector<int> Xb,vector<int> Yb ?
source share