针对目前虚拟现实中碰撞检测算法效率低精度差的问题,提出了一种改进的层次方向包围盒(OBB)算法;首先通过位置关系判断虚拟手是否在物体包围球的邻近区域,然后用OBB和八叉树算法进行详细的碰撞检测,最后利用离散点到虚拟手简化面的矢量计算法实现精确的碰撞检测;实验结果表明,随着三维物体基元数目的增多,这种由粗略到精确递进的检测方式极大地提高了碰撞检测的效率和精度,具有可行性;该算法适用于任何复杂场景中刚体结构模型的碰撞检测,在运行时候不存在滞后情况,显示流畅,而且碰撞检测精度高,完全能够满足虚拟环境实时性和精确性的要求.
For the problem of the low efficiency and the poor precision of collision detection algorithm in the virtual reality at present, a new improved hierarchical oriented bounding box (OBB) is developed. First, the the algorithm use positional relationship to judge whether virtual hand is in the nearby place of object' s bounding box, then use the OBB and octree algorithm to perform the detailed collision detection. At last, the tangent plane vector calculation method which is from discrete point to tangent plane of virtual hand is used to realize the accurate collision detection. Experimental results show that , with the increasement of the object primitives, the efficiency and accuracy is greatly improved by means of this progressive mode from coarse to precise, and it is feasible. The algorithm is applicable to collision de teetion of rigid model in any complex scenes, it does not exist lag and shows smooth when the system is running, and it' s accuracy is high. It can be fully able to meet the requirement of real--time and accuracy in the virtual environment.