Subject: CGAL users discussion list
List archive
- From: Ole Schulz-Trieglaff <>
- To:
- Subject: Computing a convex hull with points derived from Point_2
- Date: Mon, 17 Dec 2007 12:46:49 +0100
Hi,
I'm trying to compute a convex hull with points in 2D that
carry some "meta information" (e.g. two unsigned ints).
My first idea was to derive a class from Point_2 which has
two addition member. However, this does not seem to work as
I get a lengthy error message in IO/Tee_for_output_iterator.h,
line 52 where CGAL tries to assign a Point_2 to my derived class.
My code looks as follows:
-----
#include <CGAL/Cartesian.h>
#include <CGAL/convex_hull_2.h>
// "MyPointClass" derives from Point_2
vector<MyPointClass> cgal_points;
// fill cgal_points
....
// compute convex hull
std::vector<PointIndex> cgal_result;
CGAL::convex_hull_2(cgal_points.begin(), cgal_points.end(),
std::inserter(cgal_result, cgal_result.begin()));
-----
Does anyone have an idea how to attach meta information
to CGAL 2D points or how to compute a convex hull using classes
derived from Point_2 ?
Many thanks !
Ole Schulz-Trieglaff
Free University Berlin
Department of Computer Science and Mathematics
- Computing a convex hull with points derived from Point_2, Ole Schulz-Trieglaff, 12/17/2007
- Re: [cgal-discuss] Computing a convex hull with points derived from Point_2, Michael Hoffmann, 12/17/2007
- Re: [cgal-discuss] Computing a convex hull with points derived from Point_2, Andreas Meyer, 12/17/2007
- exact constructions kernel + 2D mesher ?, Maarten Moesen, 12/17/2007
- Re: [cgal-discuss] exact constructions kernel + 2D mesher ?, Andreas Fabri, 12/17/2007
- Re: [cgal-discuss] exact constructions kernel + 2D mesher ?, Maarten Moesen, 12/17/2007
- Re: exact constructions kernel + NEF polyhedra?, Maarten Moesen, 12/17/2007
- Re: [cgal-discuss] exact constructions kernel + 2D mesher ?, Laurent Rineau, 12/17/2007
- Re: [cgal-discuss] exact constructions kernel + 2D mesher ?, Maarten Moesen, 12/18/2007
- Re: [cgal-discuss] exact constructions kernel + 2D mesher ?, Andreas Fabri, 12/17/2007
- Re: [cgal-discuss] Computing a convex hull with points derived from Point_2, Michael Hoffmann, 12/17/2007
Archive powered by MHonArc 2.6.16.