Subject: CGAL users discussion list
List archive
- From: Brian Sanjeewa Rupasinghe <>
- To:
- Subject: Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation
- Date: Mon, 23 May 2011 09:13:33 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=XahRuyDJNRp0HPbvcqGMFxfoyvtaGYI5FaszrfBBJCGH8zA09TDqlSqU/sd7Unx3d8 RBvBZSe4oqDDf4v+GUK3EDTRUjk/6fhGZqQQvC5hi5mnc8kJEesRZQYbs3EQcDizvQ7q Lca39PCUGS9JBTsNAEWl2ek5a9w7L+9KK36cs=
Hi,
I added this code. But it did not work. I am relatively new to CGAL. Please help.
typedef CGAL::Triangulation_ds_face_base_with_info_2<Index, Gt> Info;
Brian.
On Mon, May 23, 2011 at 7:21 AM, Sebastien Loriot (GeometryFactory) <sloriot.ml@gmail.com> wrote:
Brian Sanjeewa Rupasinghe wrote:The error is explicit:
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>'
no info is in Triangulation_ds_face_base_2. So you need to use Triangulation_ds_face_base_with_info_2.
S.--
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;
}
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Brian Sanjeewa Rupasinghe, 05/22/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Sebastien Loriot (GeometryFactory), 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Brian Sanjeewa Rupasinghe, 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Samuel Hornus, 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Sebastien Loriot (GeometryFactory), 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Brian Sanjeewa Rupasinghe, 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Sebastien Loriot (GeometryFactory), 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Sebastien Loriot (GeometryFactory), 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Laurent Rineau (GeometryFactory), 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Brian Sanjeewa Rupasinghe, 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Samuel Hornus, 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Brian Sanjeewa Rupasinghe, 05/23/2011
- Re: [cgal-discuss] Creating Indices for vertices in Delanuay Triangulation, Sebastien Loriot (GeometryFactory), 05/23/2011
Archive powered by MHonArc 2.6.16.