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
摘要: 对被检测的2个长方体作图形变换,使其中一个长方体的最低顶点和以其作为端点的最长边分别与空间直角坐标系的原点和z轴重合,利用其在坐标平面上正投影的干涉性和空间解析几何理论得出在3D空间中2个长方体不干涉的3种可能情形,根据2D不适合多边形方法分别给出其不干涉判别条件的长方体碰撞检测算法。实验表明该方法具有较快的检测速度。
关键词:
长方体,
碰撞检测,
不适合多边形,
图形变换,
正投影
CLC Number:
LI Zi-qiang; ; TENG Hong-fei;. Algorithm of Cuboid Collision Detection Based on 2D-Nofit Plygon[J]. Computer Engineering, 2008, 34(20): 241-243.
黎自强;滕弘飞;. 基于2D不适合多边形的长方体碰撞检测算法[J]. 计算机工程, 2008, 34(20): 241-243.