更快的相交测试(AABB-AABB 或 AABB-三角形)
哪种交叉测试通常更快?一个与另一个轴对齐的边界框?或者带有三角形的轴对齐边界框。
我假设 AABB-AABB 但我听到了不同的意见。
Which intersection test is generally faster? An axis-aligned bounding box with another? Or an axis-aligned bounding box with a triangle.
I assumed AABB-AABB but I have heard mixed opinions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AABB-AABB 测试可以在任何标准 CPU 上使用(最多)六次比较和六次条件跳转来执行。你能用三角形和 AABB 做到这一点吗?请参阅此问题以了解问题的复杂性。
当然,如果您的硬件针对三角形碰撞测试进行了优化,则情况可能会有所不同。但在一般情况下,测试边界框总是比其他任何事情都要快。
An AABB-AABB test can be carried out using (at most) six compares and six conditional jumps on any standard CPU. Can you do that with a triangle and an AABB? See this question to get an idea of the problem's complexity.
Of course, if your hardware is optimized for collision-testing of triangles, this might be different. But in the general case, testing bounding boxes is always faster than about anything else.