What is AABB - Collision detection? - Stack Overflow

文章推薦指數: 80 %
投票人數:10人

AABB stands for "Axis-Aligned Bounding Box." It is a fairly computationally- and memory-efficient way of representing a volume, ... Home Public Questions Tags Users Companies Collectives ExploreCollectives Teams StackOverflowforTeams –Startcollaboratingandsharingorganizationalknowledge. CreateafreeTeam WhyTeams? Teams CreatefreeTeam Collectives™onStackOverflow Findcentralized,trustedcontentandcollaboratearoundthetechnologiesyouusemost. Learnmore Teams Q&Aforwork Connectandshareknowledgewithinasinglelocationthatisstructuredandeasytosearch. Learnmore WhatisAABB-Collisiondetection? AskQuestion Asked 8years,3monthsago Modified 3years,9monthsago Viewed 58ktimes 57 13 HiI'mmakingavoxelgameinJavaandwhileresearchingallthedifferentthingsI'dneedtolearn,InoticedthatalotofgamesuseAABBforcollisiondetection.AndthenIrememberedseeingAABBinMinecraftalso.ButwhenIgooglewhatAABBis,itonlycomesupwithotherpeoplescode,orsomeorganizationoutthehistorybook.Stackoverflow,whatisAABB? collision-detectionaabb Share Improvethisquestion Follow editedDec13,2014at3:57 user4205984 askedMar19,2014at16:32 SemperAmbroscusSemperAmbroscus 1,27822goldbadges1212silverbadges2323bronzebadges 0 Addacomment  |  2Answers 2 Sortedby: Resettodefault Highestscore(default) Trending(recentvotescountmore) Datemodified(newestfirst) Datecreated(oldestfirst) 68 AABBstandsfor"Axis-AlignedBoundingBox." Itisafairlycomputationally-andmemory-efficientwayofrepresentingavolume,typicallyusedtoseeiftwoobjectsmightbetouching. Sinceitisaxis-aligned,itdoesnotnecessarily"fit"yourreal3Dobjectverywell.AABBchecksareoftenusedasacoarsefirst-approximationtoseeifobjectsmightbecolliding.Then,iftheAABBcheckpasses,moredetailedchecksaremade. Example: Imagineyourworldis2D,andyoudrawitonasheetofgraphpaper. Youhavesomeobjectsintheworld(aball,atree,whatever).TomakeanAABBforoneoftheobjects,youdrawarectanglearoundtheobject,makingyourlinesparalleltothegridlinesonthepaper. IfyouhavetheAABBfortwoobjects,youcandosomeprettysimplemathtoseeifthoseAABBsoverlap.Iftheydon'toverlap,thosetwoobjectscouldn'tpossiblybetouching,soit'saneasyearly-outforyourcollisionalgorithm. Thisgeneralizesto3D(andmore-Ds)fairlyeasily. Youmightwanttocheckoutgamedev.stackexchange.com,too. Share Improvethisanswer Follow editedApr13,2017at12:18 CommunityBot 111silverbadge answeredMar19,2014at16:35 jwdjwd 10.4k33goldbadges3939silverbadges6262bronzebadges 2 alsosinceavoxelgameismostlycubesidontthinkthatitbeingaxis-alignedisaproblemthoughifiweremakinganrpgandiwantedmypersontolookrealisticwithoughthittingawallthatisafairdistanceaway... – SemperAmbroscus Mar19,2014at16:42 @FeatheredOrcian:Yes,ifyourvoxelsarealreadyaxis-aligned,thenAABBsaregreat.Youmightnotevenneedtostorethemseparately,butcouldderivetheirdatafromyourvoxeldata. – jwd Mar19,2014at16:44 Addacomment  |  10 AxisAlignedBoundingBox BasicallyitsthesmallestCuboidthatcancompletelycontaintheshape,usuallydefinedbyapairof3dco-ordinates. It'sveryfasttocheckforcollisionsbetweentwoAABBasallyouneedtodoischecktherangeoftheX,YandZvaluesforthecorners. Share Improvethisanswer Follow answeredMar19,2014at16:35 TimBTimB 39.9k1616goldbadges7575silverbadges127127bronzebadges 1 Howisthiscorrect?Shouldn'torientedboundingboxesbethethesmallestcuboidthatcancontaintheshape?Axisalignedboundingboxisthesmallestcuboidalignedwiththeglobalaxisthatcancompletelycontaintheshape. – joedavid Sep4,2021at9:13 Addacomment  |  YourAnswer ThanksforcontributingananswertoStackOverflow!Pleasebesuretoanswerthequestion.Providedetailsandshareyourresearch!Butavoid…Askingforhelp,clarification,orrespondingtootheranswers.Makingstatementsbasedonopinion;backthemupwithreferencesorpersonalexperience.Tolearnmore,seeourtipsonwritinggreatanswers. Draftsaved Draftdiscarded Signuporlogin SignupusingGoogle SignupusingFacebook SignupusingEmailandPassword Submit Postasaguest Name Email Required,butnevershown PostYourAnswer Discard Byclicking“PostYourAnswer”,youagreetoourtermsofservice,privacypolicyandcookiepolicy Nottheansweryou'relookingfor?Browseotherquestionstaggedcollision-detectionaabboraskyourownquestion. TheOverflowBlog GitHubCopilotishere.Butwhat’stheprice?(Ep.457) Skillinguptoarchitect:Whatyouneedtolandhigh-payingITroles FeaturedonMeta Testingnewtrafficmanagementtool Duplicatedvotesarebeingcleanedup Trending:Anewanswersortingoption AskWizardTestResultsandNextSteps Updatedbuttonstylingforvotearrows:currentlyinA/Btesting The[hyphen]tagisbeingburninated Linked 6 minimum-sizeVec3thatmovePhysicsobjecttomakepenetration=0 3 Howtointerpolatemultiplehighspeedpolygoncollisions(2D)? 1 HowcanIdetectiftwoelementsaretouching 0 PointCloudLibraryRotationofAxisAllignedBoundingBox 1 DrawRectangleforscatteredpoints 0 Three.JSlookat Related 274 BalltoBallCollision-DetectionandHandling 223 Circle-Rectanglecollisiondetection(intersection) 218 Circleline-segmentcollisiondetectionalgorithm? 2 CollisionDetectioninJavaforagame 6 CollisionDetectionUsingAABBorOBBdoubts 1 MakingCollisionDetectionmoreefficient(C#XNA) 0 CollisionDetection&Classes 0 ProblemswithBrickCollisionDetectioninBreakOutgame 0 2Dcollisiondetectiononhtml5canvas HotNetworkQuestions WhyareAssemblerscalledAssemblers? Whatdoyoucallaplacewherecertainideasareprevalent? TowhatextentcantheRussianwarinUkrainebeseenasanattempttoresolveafoodcrisis? Shortstoryaboutdrawerfulof"ghostgirls"(actuallypsychologicalprofiles?)thatneededattention Ifwereducesizeoftrainingdatasetdoesitdecreasesbias? Elderrelativeunwillingtochangewilltoreflectcurrentwishes NestaSQLfileintoanotherinSQLServer Whydowehearfrequenciesinthebasisofsinewaves? Collectdataonmushroomforests Behaviorofaloosecoinonafreefallride RandombufferinginQGIS Howearlycouldwehavehadnukes? Howtocreateanextrudedcurvedwall? Iswhitewirewithgreystripespositiveornegativewire? Sci-fionMarswherearobotangelfightsatrain Whichsoundsmorenatural:"someonewith(the)phonenumber…"or"someoneat(the)phonenumber128…"? AretheremassgravesofindigenouschildreninCanada? Bestwaytosmell-proofarevolverin1998? Otherthantherestareasforthecrew-whatelseisinthe'attic'ofanaeroplane? SQLReturnTablewithwhereclauseandoccurrencesofvalueoftotaltable Howcouldhumansrepeatedlylosetheirlatestmemories DidSamreallyplantoattacktheorcsinShelob'slairintheveryendofTheTwoTowers? Woulditbeplausibleforalaserweapontopassthroughglassandretainitsdestructivepower? HowIcanconvinceevilcharacterstosavetheworld morehotquestions Questionfeed SubscribetoRSS Questionfeed TosubscribetothisRSSfeed,copyandpastethisURLintoyourRSSreader. Yourprivacy Byclicking“Acceptallcookies”,youagreeStackExchangecanstorecookiesonyourdeviceanddiscloseinformationinaccordancewithourCookiePolicy. Acceptallcookies Customizesettings  



請為這篇文章評分?