Skip to Content.
Sympa Menu

cgal-discuss - RE: [cgal-discuss] very very basic CGAL question : how to convert handles to native types

Subject: CGAL users discussion list

List archive

RE: [cgal-discuss] very very basic CGAL question : how to convert handles to native types


Chronological Thread 
  • From:
  • To:
  • Subject: RE: [cgal-discuss] very very basic CGAL question : how to convert handles to native types
  • Date: Fri, 06 Nov 2009 09:39:11 -0500

thanks, I think I got it. If I'm not mistaken, the handle is just a pointer
to the vertex, which represents the mathematical concept of a vertex. Then
you call the appropriate function to get numerical representation of the
data like point() for position in space, index() for the position in the
data structure.

Am I Correct ?

-----Original Message-----
From: Laurent Rineau (GeometryFactory)
[mailto:]

Sent: Friday, November 06, 2009 9:11 AM
To:

Subject: Re: [cgal-discuss] very very basic CGAL question : how to convert
handles to native types

On Friday 06 November 2009 15:03:28

wrote:
> Hi everyone,
>
> I have a very basic question about how CGAL allows you to read data
> structures.
>
> in the mesh_polyhedral domain example (the code follows), once you have
> your C3t3 object how do you access the cell (which in that case is a
> tetrahedra) node indices as integers ?
>
> basically I would like to just have something similar to
>
> Vector<Tet> tetVec;
> for(C3t3::Cell_iterator iter = c3t3.cells_begin();iter!=c3t3.cells_end ()
> ;iter++){

At that point, iter->vertex(i) is a Vertex_handle, for example:

Vertex_handle vh = iter->vertex(0);

and you can access the Vertex like that:
Vertex& v = *vh;
if you want to access the Point_3:
vh->point()

--
Laurent Rineau, PhD
R&D Engineer at GeometryFactory http://www.geometryfactory.com/
Release Manager of the CGAL Project http://www.cgal.org/

--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page