navmesh 生成网格信息 三角化切分多边形中检测有效分割的算法

该博客介绍了在navmesh生成中,用于检测有效分割的两种算法:内部角度算法和边相交算法。内部角度算法快速剔除多边形外部的分割,而边相交算法确保分割不与现有边相交。只有两种算法都通过的分割才被认为是有效的。
摘要由CSDN通过智能技术生成

Detecting Valid Partitions

Two algorithms are used to determine whether a group of three vertices can form a valid internal triangle. The first algorithm is fast and can quickly cull partitions that lie entirely outside of the polygon. If the partition is inside the polygon a more expensive algorithm is used to make sure it doesn't intersect any existing polygon edges.

两个算法用来实现这一点:

第一个算法简单,并且可以很快地排除掉完全在多边形外边的分割。

第二个算法是用来确保在多边形内部的分割不会与其它已经存在的多边形的边相交。

 

The Internal Angle Algorithm

 

如图:AB是要检测的潜在分割

Cast two rays out along the edges connected to vertex A. The interior angle is the angle in the direction of the polygon. If the partition endpoint (vertex B) is within the interior angle, then it is a potential valid partition.

找到点A所连

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值