Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Example of vertex item for convex_hull_3 function
- Date: Mon, 15 Feb 2010 15:06:19 +0100
Hello,
It may not fit your need, but a simple solution is to use Delaunay_triangulation_3 and a vertex_with_info to compute the convex hull of your 3D points.
The customization of the vertex is described here:
http://www.cgal.org/Manual/last/doc_html/cgal_manual/Triangulation_3/Chapter_main.html#Subsection_35.6.2
to set the info you need to write something like:
Vertex_handle v=t.insert(pt);
v->info()=something;
then the vertices on the convex_hull can be retrieve using the vertices adjacent to the infinite vertex, like this:
t.adjacent_vertices(t.infinite_vertex(), output_iterator);
If you really need to use the Convex_hull_3 package, then you will probably have to defined your own kernel as described here:
http://www.cgal.org/Manual/last/doc_html/cgal_manual/Kernel_23/Chapter_main.html#Section_9.5
S.
wrote:
Dear CGAL users,
I want to attach an item per vertex to a set of points for which I want the
convex hull (let say an index).
I have understood that I need to refine CGAL::Polyhedron_items_3 as in the
examples:
examples/Polyhedron/polyhedron_prog_color.cpp
examples/Surface_mesh_simplification/edge_collapse_enriched_polyhedron.cpp
however in these examples, the custom field of the face/edge is filled after
the construction, but I would like to provide a point with the appropriate
index before a call to convex_hull_3.
It probably means that I have to define my own kind of point (probably derived
from one of the CGAL class).
As I am not sure if this is even possible, I would be really happy if somebody
can share her/his experience with such a problem such that I can switch to an
other implementation as quickly as possible if my understanding is correct.
Is there an example of such a specialization somewhere in the documentation
that I missed?
Did somebody already have solved this kind of problem?
- thank you in advance,
Manuel
- [cgal-discuss] Example of vertex item for convex_hull_3 function, manuel.yguel, 02/15/2010
- Re: [cgal-discuss] Example of vertex item for convex_hull_3 function, Sebastien Loriot (GeometryFactory), 02/15/2010
- Re: [cgal-discuss] Example of vertex item for convex_hull_3 function, Manuel Yguel, 02/15/2010
- Re: [cgal-discuss] Example of vertex item for convex_hull_3 function, Sebastien Loriot (GeometryFactory), 02/15/2010
- Re: [cgal-discuss] Example of vertex item for convex_hull_3 function, Manuel Yguel, 02/15/2010
- Re: [cgal-discuss] Example of vertex item for convex_hull_3 function, Sebastien Loriot (GeometryFactory), 02/15/2010
- Re: [cgal-discuss] Example of vertex item for convex_hull_3 function, Manuel Yguel, 02/15/2010
- Re: [cgal-discuss] Example of vertex item for convex_hull_3 function, Sebastien Loriot (GeometryFactory), 02/15/2010
Archive powered by MHonArc 2.6.16.