作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2008, Vol. 34 ›› Issue (20): 241-243. doi: 10.3969/j.issn.1000-3428.2008.20.088

• 图形图像处理 • 上一篇    下一篇

基于2D不适合多边形的长方体碰撞检测算法

黎自强1,2,3,滕弘飞1,4   

  1. (1. 大连理工大学计算机科学与工程系,大连 116024;2. 湘潭大学信息工程学院,湘潭 411105;3. 精密与特种加工教育部重点实验室,大连 116024;4. 大连理工大学机械工程学院,大连 116024)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2008-10-20 发布日期:2008-10-20

Algorithm of Cuboid Collision Detection Based on 2D-Nofit Plygon

LI Zi-qiang1,2,3 , TENG Hong-fei1,4   

  1. (1. Department of Computer Science and Engineering, Dalian University of Technology, Dalian 116024; 2. School of Information & Engineering, Xiangtan University, Xiangtan 411105; 3. Key Laboratory for Precision & Non-traditional Machining of Ministry of Education, Dalian 116024; 4. School of Mechanical Engineering, Dalian University of Technology, Dalian 116024)
  • Received:1900-01-01 Revised:1900-01-01 Online:2008-10-20 Published:2008-10-20

摘要: 对被检测的2个长方体作图形变换,使其中一个长方体的最低顶点和以其作为端点的最长边分别与空间直角坐标系的原点和z轴重合,利用其在坐标平面上正投影的干涉性和空间解析几何理论得出在3D空间中2个长方体不干涉的3种可能情形,根据2D不适合多边形方法分别给出其不干涉判别条件的长方体碰撞检测算法。实验表明该方法具有较快的检测速度。

关键词: 长方体, 碰撞检测, 不适合多边形, 图形变换, 正投影

Abstract: This paper conducts transform two cuboids to be detected, so that lowest vertex of one of the two cuboids coincides with coordinates origin and the longest side line-segment parallels to z-axes. Afterward, according to theory of solid analytic geometry and interference of orthographic projections of the two cuboids on coordinate faces, position relation of no interfere for two cuboids in 3D space is divided into three possible cases, and using 2D-nofit polygon the corresponding judgment condition is given out for every one respectively. An algorithm of collision detection for the two cuboids is presented. Experiment shows that detection speed of the approach is faster.

Key words: cuboid, collision detection, nofit polygon, graph transform, orthographic projection

中图分类号: