Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Triangulating Polyhedron faces in CGAL

Tags:

cgal

Having an arbitrary polyhedron in CGAL (one that can be convex, concave or, even, have holes) how can I triangulate its faces so that I can create OpenGL Buffers for rendering?

I have seen the convex_hull_3() returns a polyhedron that has triangulated faces, but it won't do what I want for arbitrary polyhedrons.

like image 454
zync Avatar asked Oct 01 '22 20:10

zync


1 Answers

The header file <CGAL/triangulate_polyhedron.h> contains a non-documented function

template <typename Polyhedron>
void triangulate_polyhedron(Polyhedron& p)

that is working with CGAL::Exact_predicates_inexact_constructions_kernel for example.

like image 137
sloriot Avatar answered Oct 06 '22 02:10

sloriot