Subject: CGAL users discussion list
List archive
- From: Omer Ozturk <>
- To:
- Subject: [cgal-discuss] Facet Iteration Order
- Date: Tue, 3 Jun 2014 03:35:16 -0700 (PDT)
I'm trying to iterate each facet on a surface. In my application, facets are
iterated randomly but I need to iterate them in a sequential order. How can
I do this with using CGAL's facet iterator? Here is my code;
for(FacetIterator = pRemesh->facets_begin(); FacetIterator !=
pRemesh->facets_end(); ++FacetIterator){
FacetVertexIterator = FacetIterator->facet_begin();
Polyhedron::Vertex_const_handle v1 = FacetVertexIterator->vertex();
FacetVertexIterator++;
Polyhedron::Vertex_const_handle v2 = FacetVertexIterator->vertex();
FacetVertexIterator++;
Polyhedron::Vertex_const_handle v3 = FacetVertexIterator->vertex();
Polyhedron* CurrentTriangle = new Polyhedron();
CurrentTriangle->make_triangle(v1->point(), v2->point(), v3->point());
Scene_polyhedron_item* CurrentItem = new
Scene_polyhedron_item(CurrentTriangle);
CurrentItem->setColor(QColor((red+=20), (green+=10), (blue+=5)));
CurrentItem->setRenderingMode(item->renderingMode());
CurrentItem->setVisible(true);
scene->addItem(CurrentItem);
}
Thanks.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Facet-Iteration-Order-tp4659392.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Facet Iteration Order, Omer Ozturk, 06/03/2014
Archive powered by MHonArc 2.6.18.