APP下载

基于形状分类的包围盒碰撞检测优化算法

2016-03-17孙劲光吴素红周积林

计算机应用与软件 2016年2期
关键词:分类优化检测

孙劲光 吴素红 周积林

1(辽宁工程技术大学电子与信息工程学院 辽宁 葫芦岛 125105)

2(辽宁工程技术大学研究生学院 辽宁 葫芦岛 125105)



基于形状分类的包围盒碰撞检测优化算法

孙劲光1吴素红2周积林2

1(辽宁工程技术大学电子与信息工程学院辽宁 葫芦岛 125105)

2(辽宁工程技术大学研究生学院辽宁 葫芦岛 125105)

摘要由于现有的包围盒不能足够紧密地包围所有待检测的物体,剔除不相交物体的效果差导致了碰撞检测效率低。针对这个问题,提出一种基于形状分类的包围盒碰撞检测优化算法。算法根据每个物体的偏球率将它们进行分类,形状接近球体的,采用球包围盒;形状与球体偏离大的,采用OBB包围盒,这能够更加逼近真实的物体。同时,加入时空相关性和区域划分策略来优化遍历过程。实验结果表明,该算法缩短了相交测试的时间,提高了碰撞检测的效率。

关键词碰撞检测层次包围盒形状分类区域划分时空相关性

OPTIMISATION ALGORITHM FOR BOUNDING BOX COLLISION DETECTION BASED ON SHAPE CLASSIFICATION

Sun Jinguang1Wu Suhong2Zhou Jilin2

1(School of Electronics and Information Engineering,Liaoning Technical University,Huludao 125105,Liaoning, China)2(Institute of Graduate,Liaoning Technical University,Huludao 125105,Liaoning, China)

AbstractSince current bounding boxes cannot sufficiently close to surround all the objects to be detected,the poor effect of weeding out disjoint objects leads to low efficiency in collision detection. In view of this,we propose a shape classification-based optimisation algorithm for bounding box collision detection. This algorithm classifies objects according to the similar-to-sphere rate of each object. For those similar to sphere in shape,it uses the sphere bounding box,and those deviating a lot from sphere in shape,the oriented bounding box will be used,in this way it can better approach real objects. At the same time,the spatiotemporal correlation and space division strategy are added to optimise the process of traversal. Experimental results show that the algorithm shortens the time of intersection test and improves the efficiency of collision detection.

KeywordsCollision detectionHierarchical bounding boxShape classificationSpace divisionSpatiotemporal correlation

0引言

碰撞检测是一项用来检测虚拟环境中的物体在某一时间点上是否占据了同一空间的技术,它可以应用在计算机动画、计算机辅助设计、虚拟现实等各个领域。

由于碰撞检测的应用极其广泛,国内外的专家们已经对其研究多年,并已形成了比较经典的两类算法:空间分割法[1]和层次包围盒法。其中层次包围盒算法由于构造简单且检测更精确,所以更常用。它的核心思想是用体积略大而几何特性简单的包围盒来代替复杂的几何对象,通过构造层次树并对其进行遍历来确定物体的相交状态。……

登录APP查看全文

猜你喜欢

分类优化检测
超限高层建筑结构设计与优化思考
民用建筑防烟排烟设计优化探讨
关于优化消防安全告知承诺的一些思考
分类算一算
一道优化题的几何解法
教你一招:数的分类
小波变换在PCB缺陷检测中的应用