Mehdi bayat
Mehdi bayat

Reputation: 189

how can i do delaunay triangulation of simple polygon and find it's neighbors for any triangles in cgal

how can i do using CGAl, Delaunay triangulation of polygon (simple without hole and in cw order) and get a list of the neighbors of triangles for any triangle that generated from the Delaunay triangulation?

Upvotes: 0

Views: 727

Answers (2)

Andreas Fabri
Andreas Fabri

Reputation: 1235

Look at the example in the User Manual: http://doc.cgal.org/latest/Triangulation_2/index.html#title29

You must distinguish between faces in and outside of the polygon.

When you have a face handle you can get the three neighbor faces with the function neighbor(i) for i = 0, 1, and 2

See: http://doc.cgal.org/latest/TDS_2/classTriangulationDSFaceBase__2.html

Upvotes: 1

Cybercartel
Cybercartel

Reputation: 12592

You can download my PHP class delaunay triangulation @ phpclasses.org. To find all adjacent triangle you can download my class voronoi @ phpclasses.org. To pull adjacent triangle of my class you need to loop through each vertex.

Upvotes: 0

Related Questions