Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Obtaining coordinates from vertex_handle in CGAL::Polyhedron_3<CGAL::Exact_predicates_exact_constructions_kernel>
Chronological Thread
- From: "Laurent Rineau (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Obtaining coordinates from vertex_handle in CGAL::Polyhedron_3<CGAL::Exact_predicates_exact_constructions_kernel>
- Date: Wed, 20 May 2009 12:11:11 +0200
- Organization: GeometryFactory
On Wednesday 20 May 2009 11:57:27 Matthias Teich wrote:
> Hello again!
>
> I am trying to obtain the x,y,z coordinates of a vertex in a
> CGAL::Polyhedron_3<CGAL::Exact_predicates_exact_constructions_kernel>.
>
> Therefor I do something like the following:
>
> #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
> #include <CGAL/Polyhedron_3.h>
>
> typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
> typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
> typedef Polyhedron::Vertex_iterator Vertex_iterator;
> typedef Kernel::Point_3 Point_3;
>
> void test()
> {
> Polyhedron p;
> for ( Vertex_iterator v = p.vertices_begin(); v != p.vertices_end();
> ++v)
> {
> Point_3 point = v->point();
> double d0 = point.x();
> }
> }
Use:
double d0 = CGAL::to_double(point.x());
A note about the use of mails: next time, please open a *new* discussion
thread. The Reply button of your email software is only to *continue* a
discussion, even if you change the subject. Next time perhaps you will not
get
answers because people able to answer you will not see you email lost deep in
another discussion thread.
--
Laurent Rineau, PhD
Engineer at GeometryFactory
http://www.geometryfactory.com/
- Re: [cgal-discuss] Polyhedron demo problem, (continued)
- Re: [cgal-discuss] Polyhedron demo problem, Martial TOLA (CNRS-Liris), 05/19/2009
- Re: [cgal-discuss] Polyhedron demo problem, Laurent Rineau (GeometryFactory), 05/19/2009
- Re: [cgal-discuss] Polyhedron demo problem (bis), Laurent Rineau (GeometryFactory), 05/18/2009
- Re: [cgal-discuss] Polyhedron demo problem (bis), Martial TOLA (CNRS-Liris), 05/19/2009
- Re: [cgal-discuss] Polyhedron demo problem (bis), Laurent Rineau (GeometryFactory), 05/19/2009
- Re: [cgal-discuss] Polyhedron demo problem (bis), Martial TOLA (CNRS-Liris), 05/20/2009
- Re: [cgal-discuss] Polyhedron demo problem (bis), Laurent Rineau (GeometryFactory), 05/20/2009
- Re: [cgal-discuss] Polyhedron demo problem (bis), Martial TOLA (CNRS-Liris), 05/20/2009
- [cgal-discuss] Obtaining coordinates from vertex_handle in CGAL::Polyhedron_3<CGAL::Exact_predicates_exact_constructions_kernel>, Matthias Teich, 05/20/2009
- Re: [cgal-discuss] Obtaining coordinates from vertex_handle in CGAL::Polyhedron_3<CGAL::Exact_predicates_exact_constructions_kernel>, Laurent Rineau (GeometryFactory), 05/20/2009
- Re: [cgal-discuss] Polyhedron demo problem (bis), Martial TOLA (CNRS-Liris), 05/19/2009
Archive powered by MHonArc 2.6.16.