Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Own Types as Sites in a voronoi diagram?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Own Types as Sites in a voronoi diagram?


Chronological Thread 
  • From: Tom Kazimiers <>
  • To:
  • Subject: Re: [cgal-discuss] Own Types as Sites in a voronoi diagram?
  • Date: Thu, 12 Feb 2009 13:56:12 +0100

Hi again,

I guess I have figured it out myself. The * operator and the -> operator
are overloaded and to
get a "My_vertex_base" out of a Vertex_handle I have just to use the
*-Operator :)
(and &* to get a point to it, resp.).

Thanks anyways,
Tom


Tom Kazimiers schrieb:
> Hi,
>
> I played around with the "Adding handles" example which was very useful
> to me, but one question could not be answered by myself:
> In the mentioned example there is a custom Vertex class "My_vertex_base":
>
> template < class Gt, class Vb =
> CGAL::Triangulation_vertex_base_2<Gt> >
> class My_vertex_base
> : public Vb
> ...
>
> which is used in a triangulation as following:
>
> struct K :
> CGAL::Exact_predicates_inexact_constructions_kernel {};
>
> typedef My_vertex_base<K> Vb;
> typedef CGAL::Triangulation_data_structure_2<Vb> Tds;
> typedef CGAL::Triangulation_2<K,Tds> Triangulation;
>
> typedef Triangulation::Vertex_handle Vertex_handle;
>
> Well, besided that the rebinding is not clear to me in its full extent I
> get this to work.
> In the example there are some points added and one gets back a
> "Vertex_handle".
> Now, is it possible to "transform" this Vertex_handle in a
> "My_vertex_base" ? I see that Vertex_handle has the added methods in
> My_vertex_base, but still has another type. The thing is I want to get
> back "My_vertex_base" instances from the triangulation, can this be done?
>
> Thanks in advance and for your patience :)
> Tom
>
>
> Tom Kazimiers schrieb:
>
>> Daniel,
>>
>> thanks for your reply. Your link is what I am looking for :)
>> I realized that I indeed need a delaunay triangulation and not its dual,
>> the voronoi diagram, so the manual helps alot.
>>
>> Thanks,
>> Tom
>>
>>
>> schrieb:
>>
>>
>>>> Ideally I would like to get back a type of mine (which should extend
>>>> Vertex_handle I guess) in which I could attach some information to a
>>>> vertex in
>>>> the diagram. Is there a way to achive this? It would be really nice if
>>>> you
>>>> could point me in the right direction.
>>>>
>>>>
>>>>
>>> This section of the manual was very helpful in my case:
>>>
>>> 29.11 Flexibility: Using Customized Vertices and Faces
>>>
>>> http://www.cgal.org/Manual/3.4/doc_html/cgal_manual/Triangulation_2/Chapter_main.html#Section_29.11
>>>
>>> See the example "Adding colors".
>>>
>>> Best,
>>>
>>> Daniel
>>>
>>>
>>> --------------------------------------------------------------------------
>>> Mensaje enviado mediante una herramienta Webmail integrada en *El Rincon*:
>>> ------------->>>>>>>> https://rincon.uam.es <<<<<<<<--------------
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>




Archive powered by MHonArc 2.6.16.

Top of Page