Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Terrain + hierarchy

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Terrain + hierarchy


Chronological Thread 
  • From:
  • To:
  • Subject: Re: [cgal-discuss] Terrain + hierarchy
  • Date: Mon, 03 Dec 2007 10:33:52 +0100

Hi,

just a try:

what if you write
typedef CGAL::Triangulation_face_base_2<Et> Fb;
instead of using K as template parameter there?

best
Monique Teillaud

Daniel Duque Campayo wrote:
Hello,

I have been using the "Euclidean traits xy_3" route in order to build a 2D terrain. Things work fine, but since a lot ot queries are going to be made I would also like to use a hierarchy, and that's when I get into trouble. I include the head of my code, with the commented line that would (in an ideal world) provide the hierarchy. I just want to know if this is possible at all, if not I guess I can a) use vertex+info, then store the "z" value of each vertex as info b) something like inherit the vertex class overriding the "point()" function (too much trouble, I'd probably try a) ).

Thanks very much,

Daniel

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_euclidean_traits_xy_3.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_hierarchy_2.h>
#include <CGAL/intersections.h>

#include<vector>
#include<iostream>
#include<string>

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Et;

typedef CGAL::Triangulation_vertex_base_2<Et> Vbb;
typedef CGAL::Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
typedef CGAL::Triangulation_face_base_2<K> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
typedef CGAL::Delaunay_triangulation_2<Et,Tds> Dt;
// This won't work:
//typedef CGAL::Triangulation_hierarchy_2<Dt> Triangulation;
// So, settle for:
typedef Dt Triangulation;





Archive powered by MHonArc 2.6.16.

Top of Page