Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation

Subject: CGAL users discussion list

List archive

[cgal-discuss] Creating Indices for vertices in Delanuay Triangulation


Chronological Thread 
  • From: Brian Sanjeewa Rupasinghe <>
  • To:
  • Subject: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation
  • Date: Sun, 22 May 2011 17:39:38 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=npZkEEqlYj5iv3UYN50EpZhDzQQUkvIdsSeo9Miblkc4fFLHUuWBuNTHq61QUEnp6Y hxxwzeEVGhHS7hPJrlKQBkT5/U1BrN3nsTq2nQ+uhqC1Gz5H0PCzSiJiFyMwY1KHuV6q ZlLJq3KOO4Pbo3eRFU60cO1oBSfFDggBFPbVY=

Hi,

When i run the following to create Delanuay Triangulation and index of the vertices,
Following error occurs. 

error C2039: 'info' : is not a member of 'CGAL::Triangulation_ds_face_base_2<TDS>'

I am new to CGAL. Please help

Brian.



// vertex.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Projection_traits_xy_3.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <fstream>
/////////////////
#include <CGAL/basic.h> 
#include <CGAL/Triangulation_face_base_2.h> 
#include <CGAL/Triangulation_vertex_base_2.h> 
#include <CGAL/Triangulation_vertex_base_with_info_2.h> 
#include <CGAL/Triangulation_data_structure_2.h> 

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Projection_traits_xy_3<K>  Gt;
typedef K::Point_3   Point;
typedef CGAL::Delaunay_triangulation_2<Gt> CDT; 
typedef CGAL::Triangulation_face_base_2<Gt> Fb;   
typedef CDT::Finite_faces_iterator Finite_faces_iterator;
typedef CDT::Vertex_handle Vertex_handle; 
typedef CDT::Face_handle Face_handle; 
typedef int Index; 
typedef CGAL::Triangulation_vertex_base_with_info_2<Index, Gt> Info;  

int _tmain()
{
//std::ifstream in("data/terrain.cin");
std::ifstream in("data/test.cin");
std::istream_iterator<Point> begin(in);
std::istream_iterator<Point> end;
CDT dt;
dt.insert(begin, end);
//
// Loop through faces of triangulation and assign index to vertices 
int q = 0; 
Finite_faces_iterator fvi = dt.finite_faces_begin();
for( ; fvi != dt.finite_faces_end(); ++fvi)
                fvi->info()= q++; 
//
std::cout << dt.number_of_vertices() << std::endl;
std::cout << dt.number_of_faces() << std::endl;
std::cout << dt;
return 0;
}



Archive powered by MHonArc 2.6.16.

Top of Page