Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Re: Surface facet from Triangulation_3
- Date: Mon, 06 Dec 2010 14:46:15 +0100
piroshiki wrote:
a handle is a kind of pointer.
Thank you for your reply. I appreciate your help.
But I cannot write a code that works fine.
My code is like this :
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Delaunay_triangulation_3<K> Triangulation;
typedef Triangulation::Cell_handle Cell_handle;
typedef Triangulation::Vertex_handle Vertex_handle;
typedef Triangulation::Locate_type Locate_type;
typedef Triangulation::Point Point;
typedef Triangulation::Facet Facet;
・・・
std::list< Cell_handle > cells;
T.incident_cells( T.infinite_vertex( ), std::back_inserter( cells ) );
std::list< Cell_handle >::iterator cit;
for( cit = cells.begin()( ); cit != cells.end( ); cit++ ){
Cell_handle tmp_cell = *cit;
std::make_pair( tmp_cell, tmp_cell.index( T.infinite_vertex( ) ) );
}
"tmp_cell" is Triangulation::Cell_handle, and it doesn't have "index"
try tmp_cell->index( T.infinite_vertex( ) )
I don't know what you mean but a facet is a pair(c,i) so that
"c.index( Vertex_handle v)" is written here:
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/TriangulationDS_3_ref/Concept_TriangulationDataStructure_3--Cell.html
So, I think I have to use TriangulationDataStructure_3::Cell, but I don't
know how I can do it.
And I don't know how to get facets(c, i) after execute std::make_pair,
either.
you can access the three vertices of the facet like this
c->vertex( (i+1) %4)
c->vertex( (i+2) %4)
c->vertex( (i+3) %4)
S.
- [cgal-discuss] Surface facet from Triangulation_3, piroshiki, 12/03/2010
- Re: [cgal-discuss] Surface facet from Triangulation_3, Sebastien Loriot (GeometryFactory), 12/06/2010
- [cgal-discuss] Re: Surface facet from Triangulation_3, piroshiki, 12/06/2010
- Re: [cgal-discuss] Re: Surface facet from Triangulation_3, Sebastien Loriot (GeometryFactory), 12/06/2010
- [cgal-discuss] Re: Surface facet from Triangulation_3, piroshiki, 12/06/2010
- Re: [cgal-discuss] Surface facet from Triangulation_3, Sebastien Loriot (GeometryFactory), 12/06/2010
Archive powered by MHonArc 2.6.16.