计算机应用 ›› 2015, Vol. 35 ›› Issue (1): 194-197.DOI: 10.11772/j.issn.1001-9081.2015.01.0194

• 虚拟现实与数字媒体 • 上一篇    下一篇

基于分类遍历的碰撞检测优化算法

孙劲光1, 吴素红2   

  1. 1. 辽宁工程技术大学 电子与信息工程学院, 辽宁 葫芦岛125105;
    2. 辽宁工程技术大学 研究生院, 辽宁 葫芦岛125105
  • 收稿日期:2014-08-15 修回日期:2014-09-12 出版日期:2015-01-01 发布日期:2015-01-26
  • 通讯作者: 吴素红
  • 作者简介:孙劲光(1962-),女,辽宁阜新人,教授,博士,主要研究方向:数据挖掘、图形和图像处理、人脸识别;吴素红(1989-),女,辽宁沈阳人,硕士研究生,主要研究方向:计算机图形学.
  • 基金资助:

    国家科技支撑计划项目(2013BAH120f00).

Collision detection optimization algorithm based on classified traversal

SUN Jinguang1, WU Suhong2   

  1. 1. School of Electronic and Information Engineering, Liaoning Technical University, Huludao Liaoning 125105, China;
    2. Graduate School, Liaoning Technical University, Huludao Liaoning 125105, China
  • Received:2014-08-15 Revised:2014-09-12 Online:2015-01-01 Published:2015-01-26

摘要:

针对现有层次树遍历方法的低效率问题,提出了一种基于分类遍历的碰撞检测算法.首先根据两个物体树中节点的平衡因子差值来将所有的物体对进行分类:结构相似的,采用同步下降遍历方法;结构不相似的,采用交换下降遍历方法,这减少了相交测试的次数.然后加入时空相关性和优先级策略优化遍历过程.最后通过实验结果表明,相比基于统一遍历的碰撞检测算法,该算法缩短了相交测试的时间,物体数目越多,快速性优势越显著,大约可以缩减所需时间的1/5.

关键词: 碰撞检测, 层次包围盒, 分类遍历, 深度优先, 物体结构, 时空相关性

Abstract:

To solve the problem that present traversal methods of hierarchical tree which lead to low efficiency, a new collision detection algorithm based on classified traversal was proposed. Firstly, these objects were classified according to the difference between the balance factors of two tree' nodes. The simultaneous depth-first traversal method was applied to the objects which have similar structure, and the commutative depth-first traversal method was applied to the other objects, which reduced the number of intersect tests. Then, the process of traversal was optimized by using the temporal spatial coherence and priority strategy. Finally, the experimental results show that, compared with the collision detection algorithm based on unified traversal, the proposed algorithm shortens the time of the intersection test. The bigger the number of objects, the more significant the advantage of quickness, it can reduce about 1/5 of the required time.

Key words: collision detection, hierarchical bounding box, classified traversal, depth-first, object structure, temporal spatial coherence

中图分类号: