简体   繁体   English

CGAL 2D三角剖分:仅获取内部三角形

[英]CGAL 2D Triangulation: Get only inner triangles

I am using CGAL 4.13 to do some 2D triangulation of an outline. 我正在使用CGAL 4.13对轮廓进行2D三角剖分。 In my case some random data originally read from GeoJSON: 就我而言,最初是从GeoJSON读取一些随机数据:

GeoJSON大纲

The triangulation is done exactly like mentioned in the CGAL user manual: https://doc.cgal.org/latest/Mesh_2/index.html#title14 完全按照CGAL用户手册中所述进行三角剖分: https : //doc.cgal.org/latest/Mesh_2/index.html#title14

But when I fetch the triangles out of the Mesher (via mesher.triangulation() ), is do not only get the inner triangles but also some "outer" triangles: 但是,当我从Mesher提取三角形时(通过mesher.triangulation() ),不仅获得了内部三角形,而且还获得了一些“外部”三角形:

OpenGL渲染器三角形

Is there a way to get only the triangles matching to the outlines? 有没有办法只获得与轮廓匹配的三角形? Like this: 像这样: 所需的渲染

三角剖分的面部类型具有成员函数is_in_domain()

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM