What are parameters worldAabbMin & worldAabbMax

Post Reply
whitwhoa
Posts: 17
Joined: Tue Jun 11, 2019 7:30 pm

What are parameters worldAabbMin & worldAabbMax

Post by whitwhoa »

In regards to broadphase method:

Code: Select all


bt32BitAxisSweep3::bt32BitAxisSweep3	(	
const btVector3 & 	worldAabbMin,
const btVector3 & 	worldAabbMax,
unsigned int 	maxHandles = 1500000,
btOverlappingPairCache * 	pairCache = 0,
bool 	disableRaycastAccelerator = false 
)	
What exactly are parameters worldAabbMin and worldAabbMax? Some examples I have seen set this number to 500/-500 some 1000/-1000. I may be totally off here but from the looks of it are these values the max size of the scene?
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: What are parameters worldAabbMin & worldAabbMax

Post by drleviathan »

Yes, when using an axis-sweep broadphase you have to decide at construction time its bounds. The sweep algorithm usually quantizes the bounds of the elements inside, so it needs to know what are the world limits so it can set the quantization. This also means if you use Really Big world bounds then the element bounds will be relatively coarse. The trade off is: you get a broadphase with low memory footprint.

If you use btDbvtBroadphase then you don't need to set world limits.
whitwhoa
Posts: 17
Joined: Tue Jun 11, 2019 7:30 pm

Re: What are parameters worldAabbMin & worldAabbMax

Post by whitwhoa »

Thank you for the explanation. That makes total sense :)
Post Reply