Polygon Triangulation with Holes

前端 未结 9 925
终归单人心
终归单人心 2020-11-30 19:12

I am looking for an algorithm or library (better) to break down a polygon into triangles. I will be using these triangles in a Direct3D application. What are the best availa

9条回答
  •  盖世英雄少女心
    2020-11-30 19:30

    Another option (with a very flexible license) is to port the algorithm from VTK:

    vtkDelaunay2D

    This algorithm works fairly well. Using it directly is possible, but requires links to VTK, which may have more overhead than you want (although it has many other nice features, as well).

    It supports constraints (holes/boundaries/etc), as well as triangulating a surface that isn't necessarily in the XY plane. It also supports some features I haven't seen elsewhere (see the notes on Alpha values).

提交回复
热议问题