What are parameters worldAabbMin & worldAabbMax

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

What are parameters worldAabbMin & worldAabbMax

Post by whitwhoa » Tue Jun 11, 2019 7:42 pm

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: 554
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: What are parameters worldAabbMin & worldAabbMax

Post by drleviathan » Wed Jun 12, 2019 4:12 am

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: 5
Joined: Tue Jun 11, 2019 7:30 pm

Re: What are parameters worldAabbMin & worldAabbMax

Post by whitwhoa » Wed Jun 12, 2019 11:33 pm

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

Post Reply