when does btDbvtBroadphase() report an overlapping pair?

fastflo
Posts: 14
Joined: Mon Oct 10, 2011 10:49 am

when does btDbvtBroadphase() report an overlapping pair?

Post by fastflo »

i have two rigid bodies with an btConvexHullShape() (and initializePolyhedralFeatures()) and the Dbvt - broadphase reports an overlapping pair as soon as they are ~0.17 units apart with each body's aabb having a side-length of ~0.03 units.

if i enable the bounding boxes display in the debug drawer one can see that they are by far not intersecting.
test_dbvt_dbvt.png
if i use another broadphase like bt32BitAxisSweep3(btVector3(-1, -1, -1), btVector3(1, 1, 1)) everything works as expected - the pair of those two bodies is reported as soon as their aabb overlapp...
test_dbvt_axis_sweep.png
which bounding volume sizes does Dbvt use? obviously different to bt32BitAxisSweep3.
i've found

Code: Select all

#define DBVT_BP_MARGIN					(btScalar)0.05
in btDbvtBroadphase.h

so i guess i can not tweak that at runtime?! (only by deriving my own bp from dbvt and overloading setAabb, i'd say.)

and when exactly is the pair reported? as soon as aabb(shape) + shape-margin + DBVT_BP_MARGIN overlapp?
should'nt then DBVT_BP_MARGIN(/or a variable for that) be optionally user-setable at runtime?

a small test program demonstrating this is attached.
You do not have the required permissions to view the files attached to this post.