summaryrefslogtreecommitdiff
path: root/src/cgaladv_convexhull2.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgaladv_convexhull2.cc')
-rw-r--r--src/cgaladv_convexhull2.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cgaladv_convexhull2.cc b/src/cgaladv_convexhull2.cc
index 448dd4b..492df3c 100644
--- a/src/cgaladv_convexhull2.cc
+++ b/src/cgaladv_convexhull2.cc
@@ -29,16 +29,15 @@
#include "cgal.h"
#include <CGAL/convex_hull_2.h>
-extern CGAL_Nef_polyhedron2 convexhull2(std::list<CGAL_Nef_polyhedron2> a);
extern CGAL_Poly2 nef2p2(CGAL_Nef_polyhedron2 p);
-CGAL_Nef_polyhedron2 convexhull2(std::list<CGAL_Nef_polyhedron2> a)
+CGAL_Nef_polyhedron2 *convexhull2(std::list<CGAL_Nef_polyhedron2*> a)
{
std::list<CGAL_Nef_polyhedron2::Point> points;
- std::list<CGAL_Nef_polyhedron2>::iterator i;
+ std::list<CGAL_Nef_polyhedron2*>::iterator i;
for (i=a.begin(); i!=a.end(); i++) {
- CGAL_Poly2 ap=nef2p2(*i);
+ CGAL_Poly2 ap=nef2p2(**i);
for (size_t j=0;j<ap.size();j++) {
double x=to_double(ap[j].x()),y=to_double(ap[j].y());
CGAL_Nef_polyhedron2::Point p=CGAL_Nef_polyhedron2::Point(x,y);
@@ -49,7 +48,7 @@ CGAL_Nef_polyhedron2 convexhull2(std::list<CGAL_Nef_polyhedron2> a)
std::list<CGAL_Nef_polyhedron2::Point> result;
CGAL::convex_hull_2(points.begin(),points.end(),std::back_inserter(result));
- return CGAL_Nef_polyhedron2(result.begin(),result.end(),CGAL_Nef_polyhedron2::INCLUDED);
+ return new CGAL_Nef_polyhedron2(result.begin(),result.end(),CGAL_Nef_polyhedron2::INCLUDED);
}
#endif
contact: Jan Huwald // Impressum