资源描述:
《collision detection - texas a&m university碰撞检测-德克萨斯&;m大学》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、CollisionDetectionCSCE4412/59WhatisCollisionDetection?Giventwogeometricobjects,determineiftheyoverlap.Typically,atleastoneoftheobjectsisasetoftriangles.Rays/linesPlanesPolygonsFrustumsSpheresCurvedsurfaces3/59WhenUsedOfteninsimulationsObjectsmove–findwhentheyhitso
2、methingelseOtherexamplesRaytracingspeedupCullingobjects/classifyingobjectsinregionsUsually,needstobefastAppliedtolotsofobjects,ofteninreal-timeapplications4/59BoundingVolumesKeyidea:Surroundtheobjectwitha(simpler)boundingobject(theboundingvolume).Ifsomethingdoesno
3、tcollidewiththeboundingvolume,itdoesnotcollidewiththeobjectinside.Often,tointersecttwoobjects,firstintersecttheirboundingvolumes5/59ChoosingaBoundingVolumeLotsofchoices,eachwithtradeoffs6/59ChoosingaBoundingVolumeLotsofchoices,eachwithtradeoffsTighterfittingisbett
4、erMorelikelytoeliminate“false”intersections7/59ChoosingaBoundingVolumeLotsofchoices,eachwithtradeoffsTighterfittingisbetterSimplershapeisbetterMakesitfastertocomputewith8/59ChoosingaBoundingVolumeLotsofchoices,eachwithtradeoffsTighterfittingisbetterSimplershapeisb
5、etterRotationInvariantisbetterEasiertoupdateasobjectmoves9/59ChoosingaBoundingVolumeLotsofchoices,eachwithtradeoffsTighterfittingisbetterSimplershapeisbetterRotationInvariantisbetterConvexisusuallybetterGivessimplershape,easiercomputation10/59CommonBoundingVolumes
6、:SphereRotationallyinvariantUsuallyUsuallyfasttocomputewithStore:centerpointandradiusCenterpoint:object’scenterofmassRadius:distanceoffarthestpointonobjectfromcenterofmass.Oftennotverytightfit11/59CommonBoundingVolumes:AxisAlignedBoundingBox(AABB)Veryfasttocomput
7、ewithStore:maxandminalongx,y,zaxes.Lookatallpointsandrecordmax,minModeratelytightfitMustupdateafterrotation,unlessalooseboxthatencompassestheboundingsphere12/59CommonBoundingVolumes:k-dopsk-discreteorientedpolytopesSameideaasAABBs,butusemoreaxes.Store:maxandminalo
8、ngfixedsetofaxes.Needtoprojectpointsontootheraxes.TighterfitthanAABB,butalsoabitmorework.13/59Choosingaxesfork-dopsCommonaxes:consideraxescomingoutfromc