CGAL网(ES)交叉口/冲突 [英] CGAL Mesh(es) intersection/collision

查看:269
本文介绍了CGAL网(ES)交叉口/冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想有一个碰撞检测模块中的我的追踪管道,检测何时两个不同的网格碰撞/穿插或如果有一个铰接网格的自穿透。基于所述穿透深度应该有一个惩罚是对抗这种现象。我应该为了做到这一点碰撞面/顶点列表。

在审查几个选项,我决定开始工作 CGAL

此链接还有一个有趣的答案指向一些例子。 (和的这个)。实施例使用的AABB(轴对齐包围盒),这是所提出的方法用于非刚性网格,因为需要其中一个频繁更新。这些例子都清楚了自相交的情况下,但下面的不是很清楚,我:

  • 除了创建B.Box每个三角形,我想这有引擎盖下创建的,以加快搜索过程没有树结构。是这样吗?如果是的话,任何暗示这样做呢?
  • 在的情况下2个独立的网格,我想这不是很好合并所有三角形/盒在一个向量,并按照例子(尽管它被提及的此处作为一种解决方案,它听起来不是那么优雅)。任何暗示一个不错的做法呢?如果一个混合这些的例子,通过创建三角形/盒树?虽然为AABB树它被提及的是:
  

请注意,这部分是不可以适合寻找所有相交的对象对的问题。我们引用该组件<一href="https://doc.cgal.org/4.2/CGAL.CGAL.Intersecting-Sequences-of-dD-Iso-oriented-Boxes/html/index.html#chapterBoxIntersection"相对=nofollow>的dD异导向盒相贯序列可以找到所有交叉对异导向盒。

解决方案
  1. 函数<一href="http://doc.cgal.org/latest/Box_intersection_d/group__PkgBoxIntersectionD__box__intersection__d.html"相对=nofollow> CGAL :: box_intersection_d 的上飞创建段树,以加速对相交的AA-包围盒的的计算。
  2. 据我所知,推荐的方法是合并两个面的的定制拖曳中,其中该盒子有一个字段,以指示所述表面的三角形属于标识符。这有助于迅速放弃对箱子从同一表面上。

I would like to have a collision detection module in my tracking pipeline, detecting when two different meshes collide/interpenetrate or if there is a self-penetration of an articulated mesh. Based on the depth of the penetration there should be a penalization that combats this phenomenon. I should get a list of the colliding faces/vertices in order to do so.

After examining several options, I decided to start working with CGAL.

In this link there is an interesting answer pointing to some examples. (this and this). The examples use AABBs (Axis-Aligned Bounding Boxes), which is the proposed way for non-rigid meshes, since a frequent update of them is needed. The examples are clear for the self-intersection case, but the following are not very clear to me:

  • Apart from creating a B.Box for each triangles, I guess that there is no tree structure created under the hood to speed up the search process. Is it so? If yes, any hint to do so?
  • In case of 2 separate meshes, I guess it's not nice to merge all triangles/boxes in one vector and follow the examples (though it is mentioned here as a solution, it doesn't sound so elegant). Any hint for a nice practice? Should one mix these examples, by creating trees of triangles/boxes? Although for the AABB tree it is mentioned that:

Note that this component is not suited to the problem of finding all intersecting pairs of objects. We refer to the component Intersecting Sequences of dD Iso-oriented Boxes which can find all intersecting pairs of iso-oriented boxes.

解决方案

  1. The function CGAL::box_intersection_d creates segment trees on the fly, to speed the computation of pairs of intersecting AA-bounding boxes.
  2. As far as I know, the recommended way is to merge the two surfaces in one vector of custom boxes, where the boxes have a field to indicate the identifier of the surface the triangle belongs to. That helps to quickly discard pairs of boxes from same surface.

这篇关于CGAL网(ES)交叉口/冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆