Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] How to navigate Outputiterator for inicident_edges?

Subject: CGAL users discussion list

List archive

[cgal-discuss] How to navigate Outputiterator for inicident_edges?


Chronological Thread 
  • From: <>
  • To:
  • Subject: [cgal-discuss] How to navigate Outputiterator for inicident_edges?
  • Date: Fri, 9 Oct 2009 02:35:01 +0200 (CEST)

Hi,

Given a cell, I want to navigate incident edges of that cell using
OutputIterator.

Can someone show me an example or how to?

Thanks,

Suejung

--------------------------------------

include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
#include <fstream>

typedef CGAL::Exact_predicates_inexact_constructions_kernel K;

typedef CGAL::Triangulation_vertex_base_with_info_3<CGAL::Color, K> Vb;
typedef CGAL::Triangulation_data_structure_3<Vb> Tds;
typedef CGAL::Delaunay_triangulation_3<K, Tds> Delaunay;
typedef Delaunay::Cell_handle Cell_iterator;
typedef Delaunay::Vertex_handle Vertex_iterator;
typedef Delaunay::Edge_iterator E_iterator;

typedef Delaunay::Cell Cell;
typedef Delaunay::Point Point;
std::map< Vertex_iterator , size_t> vIndex;

using namespace std;

int main()
{
Delaunay T;

std::ifstream in("data/voronoi.cin");

Point p;
while(in >> p){
T.insert(p);
}



cout << "All Cells ----------------------------\n";
Cell_iterator cit =T.cells_begin();
for ( ; cit !=T.cells_end(); ++cit) {
if (! T.is_infinite(cit)) continue;

// T.incident_edges(cit) ?????? <<--- Want to find edges!!!

}

return 0;
}



Archive powered by MHonArc 2.6.16.

Top of Page