Bounding Volumes(包围体)
用于快速粗略判断两个物体是否可能发生碰撞,优点是测试速度快

- Sphere(球体)
- 最简单,只要比较球心距离和半径之和
- 不适合细长或不对称物体,误差大
- AABB(Axis-Aligned Bounding Box)
- 长方体,对齐世界坐标轴
- 测试快,但旋转会导致包围体很大
- OBB(Oriented Bounding Box)
- 长方体可旋转,更紧凑
- 但测试(分离轴定理)复杂,更新成本高
- 6-DOP(6-Discrete Oriented Polytopes)
- 用 6 个面方向定义的多面体,常见于 3 轴方向的投影
- 更紧凑,可以扩展为 8/14/18-dop
- Convex Hull(凸包)
- 紧密贴合所有顶点构成的最小凸形
- 最精确,但也最复杂
Bounding Volume Hierarchies(BVH)
为了解决复杂模型的碰撞检测,不是用一个包围盒包所有三角形,而是构造树形结构:
Model Hierarchy:
– each node has a simple volume that bounds a set of triangles
– children contain volumes that each bound a different portion of the parent’s triangles
– The leaves of the hierarchy usually contain individual triangles
这种层次结构在碰撞检测时非常高效,因为:
- 递归排除:上层包围体若不相交,下面就不必检测了
- 早停机制:越早排除越省计算
A binary bounding volume hierarchy:
