Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Vertex_Base_with_info_3 .. some questions

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Vertex_Base_with_info_3 .. some questions


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [cgal-discuss] Vertex_Base_with_info_3 .. some questions
  • Date: Thu, 28 Feb 2008 10:18:33 +0100

Hi Thomas

Regular_triangulation::Facet needs to know a Cell_handle, which is not known at the vertex_base level.

Using the rebind mechanism (mentioned in the Triangulation chapter, that refers to the 3D Triangulation data structure chapter for a more extensive description) should solve your problem.
The vertex_base_with_info is a simpler but less powerful way to add information.

best
Monique Teillaud

Thomas Zangl wrote:
Hi!

I have 2 types of triangulation in my application:

* Delaunay
* Regular

I define them like this:

typedef CGAL::Regular_triangulation_euclidean_traits_3<K> Traits;
typedef CGAL::Triangulation_vertex_base_with_info_3<int, Traits> Vb;
typedef CGAL::Regular_triangulation_cell_base_3<Traits> CbBase;
typedef CGAL::Triangulation_cell_base_with_info_3<RTCellState, Traits, CbBase> Cb;
typedef CGAL::Triangulation_data_structure_3<Vb, Cb> Tds;
typedef CGAL::Regular_triangulation_3<Traits, Tds> Regular_triangulation;

and:

typedef CGAL::Triangulation_vertex_base_with_info_3<int, Traits> DVb;
typedef CGAL::Triangulation_cell_base_with_circumcenter_3<K> DCb;
typedef CGAL::Triangulation_data_structure_3<DVb, DCb> DTDS;
typedef CGAL::Delaunay_triangulation_3<K, DTDS> Delauny_Triangulation;
typedef Delauny_Triangulation::Vertex_handle Dt_Vertex_handle;

I have added some cell info to the regular triangulation. The class is called "RTCellState" and one member of it is a "Dt_Vertex_handle".
If I define the Delaunay Triangulation before I include the RTCellState.h" everything works fine as it should. Now I have an issue with extending the Delaunay_Vertex_Base with some info about the Regular_Triangulation::Facet.

So, if I change the line:
typedef CGAL::Triangulation_vertex_base_with_info_3<int, Traits> DVb;

to:
typedef CGAL::Triangulation_vertex_base_with_info_3<Regular_triangulation;::Facet, Traits> DVb;

I do get compiler errors. Any ideas to handle this case? I need both references:

From a Delaunay Vertex an info about some RegularTriang. Facet and then second reference from a RegularTriang. Cell to some Delaunay Vertex Handles.

Please help! :-) TIA,
Thomas



Archive powered by MHonArc 2.6.16.

Top of Page