Subject: CGAL users discussion list
List archive
- From: Sylvain Pion <>
- To:
- Subject: Re: [cgal-discuss] assign CGAL::Point_3 array
- Date: Fri, 19 Jun 2009 12:31:21 +0200
- Organization: INRIA
Gmain wrote:
Yes, of course... here it is:
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Filtered_kernel.h>
#include <CGAL/Lazy_exact_nt.h>
#include <CGAL/Gmpq.h>
#include <list>
typedef
CGAL::Filtered_kernel<CGAL::Simple_cartesian<CGAL::Lazy_exact_nt<CGAL::Gmpq >
>
Exact_predicates_exact_constructions_kernel;
typedef Exact_predicates_exact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point_3;
int main(int argc, char** argv){
std::list<Point_3> List;
Point_3 a=Point_3(0,1,2);
List.push_back(a);
a=Point_3(1,1,2);
List.push_back(a);
a=Point_3(2,1,2);
List.push_back(a);
a=Point_3(3,1,2);
List.push_back(a);
int i=List.size();
Point_3 PointList[i];
for (std::list<Point_3>::iterator IT=List.begin(); IT!=List.end();IT++){
int m=0;
Point_3 tempPoint=*IT;
PointList[m]=tempPoint;
m++;
std::cout << tempPoint <<" : "<< PointList[m]<<std::endl;
That might help if you moved the "m++" line after printing PointList[m]...
}
return (EXIT_SUCCESS);
}
--
Sylvain Pion
INRIA Sophia-Antipolis
Geometrica Project-Team
CGAL, http://cgal.org/
- [cgal-discuss] assign CGAL::Point_3 array, Gmain, 06/19/2009
- Re: [cgal-discuss] assign CGAL::Point_3 array, Sylvain Pion, 06/19/2009
- Re: Re: [cgal-discuss] assign CGAL::Point_3 array, Gmain, 06/19/2009
- Re: [cgal-discuss] assign CGAL::Point_3 array, Sylvain Pion, 06/19/2009
- Re: [cgal-discuss] assign CGAL::Point_3 array, Sebastien Loriot, 06/19/2009
- Re: Re: [cgal-discuss] assign CGAL::Point_3 array, Gmain, 06/19/2009
- Re: Re: [cgal-discuss] assign CGAL::Point_3 array, Gmain, 06/19/2009
- Re: [cgal-discuss] assign CGAL::Point_3 array, Sylvain Pion, 06/19/2009
Archive powered by MHonArc 2.6.16.