Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] vector of points

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] vector of points


Chronological Thread 
  • From: Frédérik Paradis <>
  • To:
  • Subject: Re: [cgal-discuss] vector of points
  • Date: Sun, 22 May 2016 13:04:17 -0400
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:KSzNahe5GTxBR6WP+l9GUi61lGMj4u6mDksu8pMizoh2WeGdxc6+YR7h7PlgxGXEQZ/co6odzbGG4ua7CSdZucnJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbviqtuIM04R3GX1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu2pN5g/GLdXBTBjP2Eu79DwrjHCSxGO7z0SSDY4iB1NVibfbR17RJby+hPzrONx2TLSacPuRKo9AWnyx7psVAPhly5BPDdvozKfsdB5kK8O+EHpnBd42YOBOIw=

You have to use the copy constructor like this:
points[0] = Point_2(1.0, 1.0);
Frédérik
 

2016-05-22 12:52 GMT-04:00 parisa rahmani <>:

Hi every one. I'm new to CGAL.
I'm a little bit confused about using vector of points in CGAL.
how can I have access to x and y elements of Point_2, I mean :
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_2 Point_2;
typedef std::vector<Point_2> Vector;

Vector points;
points.reserve(5);

int main(){
points[0].x() =1.0;
points[0].y() =1.0;
return 0;}
points[i].x() or points[i].x produces error.

thanks
Parisa




Archive powered by MHonArc 2.6.18.

Top of Page