本文介绍了将多边形转换为三角形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为了在OpenGl中创建一个VBO,我需要将多边形转换为三角形。
是否有一个脚本/代码的例子可以描述这一点?
我需要一些强健的凹凸多边形。

解决方案

是迄今为止最好的方法。



它对于凸和凹多边形,并运行在O(n ^ 2)时间

In order to create a VBO in OpenGl, I need to convert polygons to triangles.Is there an example of script/code somewhere that would describe this ?I would need something robust for convex and concave polygons.

解决方案

Ear clipping is by far the best way to do this.

It is fully robust for both convex and concave polygons and runs in O(n^2) time

这篇关于将多边形转换为三角形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-29 01:46
查看更多