Subject: CGAL users discussion list
List archive
- From: Tom Kazimiers <>
- To:
- Subject: Re: [cgal-discuss] From vertex pointers to vertex handles?
- Date: Mon, 23 Mar 2009 16:14:15 +0100
Benjamin schwarz schrieb:
> If I understand your problem, you have 'p' a pointer to a vertex and
> you would like to get a handle to that vertex. That is, you would like
> to be able to do something like :
> vertex_handle ph = p->vertex()
>
> According to the documentation, if you try to insert a point that
> coincides with an existing point, there is no insertion and you get a
> handle to the already existing point :
> Vertex_handle t.insert ( Point p, Face_handle f = Face_handle())
> Inserts point p in the triangulation and returns the
> corresponding vertex.
> If point p coincides with an already existing vertex, this vertex is
> returned and the triangulation remains unchanged.
>
> I am not very familiar with that package though. Maybe another way to
> get your handles is to "hack" through facets :
> facet_handle fh = p->facet();
> then test all three vertices in that facet to get a handle to the
> vertex that coincides with your p->point()
>
> hope this helps
>
> --Ben
>
Ben,
thank you for your further suggestions. You understood my problem: I
have a Vertex pointer 'p' and want to get ists handle. More precise I
have a pointer to an object of my interface which is also a vertex - but
the type of the pointer I get is a pointer to my interface type
(ILaunchSite).
I tryed the insertion method and it works, thank you :) It would be
interesting to get some timings for what the fastest method would be. I
will compare the methods.
My problem with the facet method is that I get, like above said, a
pointer to my type and would need a cast for this. And I try to avoid
those little performance eaters. Well, on the other hand could this be a
result of using a static interface class instead of a templated type
(Which then would be the CGALLaunchSite implementation of ILaunchSite).
Regards,
Tom
- [cgal-discuss] From vertex pointers to vertex handles?, Tom Kazimiers, 03/22/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Manuel Caroli, 03/22/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Tom Kazimiers, 03/22/2009
- <Possible follow-up(s)>
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Daniel Duque, 03/23/2009
- RE: [cgal-discuss] From vertex pointers to vertex handles?, Amir Vaxman, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Daniel Duque, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Benjamin schwarz, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Tom Kazimiers, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Tom Kazimiers, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Benjamin schwarz, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Sylvain Pion, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Tom Kazimiers, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Tom Kazimiers, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Tom Kazimiers, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Benjamin schwarz, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Tom Kazimiers, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Daniel Duque, 03/23/2009
- RE: [cgal-discuss] From vertex pointers to vertex handles?, Amir Vaxman, 03/23/2009
- Re: [cgal-discuss] From vertex pointers to vertex handles?, Manuel Caroli, 03/22/2009
Archive powered by MHonArc 2.6.16.