Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] How to resolve "'set_down' : is not a member of 'CGAL::Tvb<GT,Vb>"?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] How to resolve "'set_down' : is not a member of 'CGAL::Tvb<GT,Vb>"?


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] How to resolve "'set_down' : is not a member of 'CGAL::Tvb<GT,Vb>"?
  • Date: Mon, 21 Feb 2011 14:48:24 +0100

The Tds used is not correct if you want top use the Triangulation_hierarchy_2.


Try with this:

typedef CGAL::Triangulation_vertex_base_2<Gt> 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<Gt,Tds> Delaunay;

instead of

typedef CGAL::Delaunay_triangulation_2<Gt> Delaunay;

S.

Farzaneh wrote:
Hi,

I/m trying to write a program proccesing terrains. I need delaunay
traingulation and fast point location structure for it.

I'm getting this error while compiling:
error C2039: 'set_down' : is not a member of 'CGAL::Tvb<GT,Vb>'

and shows me this line:
cgal-3.3.1\include\cgal\triangulation_hierarchy_2.h 347

Any idea how I could resolve it?

Thanks in advance,

here is my code:

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/IO/Color.h>
#include <CGAL/Triangulation_2.h>
#include <CGAL/Triangulation_euclidean_traits_xy_3.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_hierarchy_2.h>
#include <vector>
#include <fstream>

using namespace std;
using namespace CGAL;

struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};
typedef CGAL::Triangulation_euclidean_traits_xy_3<K> Gt;
typedef CGAL::Delaunay_triangulation_2<Gt> Delaunay;
typedef CGAL::Triangulation_hierarchy_2<Delaunay> Fast_delaunay;
typedef Fast_delaunay::Face_handle Face_handle;
typedef K::Point_3 Point;


struct PointData{
Point p;
double er;
bool in;
};

int main()
{
std::ifstream in("terrain.txt");
std::istream_iterator<Point> begin(in);
std::istream_iterator<Point> end;
Fast_delaunay dt;
float x,y,z;
x=y=z=0;
float maxX,minX,maxY,minY;
float curMaxError=100;//this is computed
float maxEr=0;//this must be input
vector<PointData> pl;
bool first=true;

while(in>>x>>y>>z){
Point tempP(x,y,z);
PointData pd;
pd.er=0;
pd.in=false;
if(first){
maxX=minX=x;
maxY=minY=y;
first=false;
}
pd.p=tempP;
pl.push_back(pd);
}
Point t00(minX,minY,0);
Point t01(minX,maxY,0);
Point t10(maxX,minY,0);
Point t11(maxX,maxY,0);
dt.insert(t00);
dt.insert(t01);
dt.insert(t10);
dt.insert(t11);

for(int i=0;i<pl.size();i++){

Face_handle fh1 = dt.locate(pl[i].p);
}

for(int i=0;i<pl.size();i++){
dt.insert(pl[i].p);
}
std::cout << dt.number_of_vertices() << std::endl;
return 0;
}





Archive powered by MHonArc 2.6.16.

Top of Page