Page 1 of 1

b3DynamicBvh and cost function / ordering

Posted: Thu May 04, 2017 5:07 pm
by Andy Somogyi
Hi,

I'm working on documenting b3DynamicBvh and trying to better understand it.

I'm not entirely clear what how nodes are ordered, i.e. what is the relationship between the left and right child nodes.

It looks like b3Select is used as the cost function when inserting new nodes. According to the rather old docs on BtDbvt,

http://www.bulletphysics.org/mediawiki- ... _aabb_tree

it says that the cost function is the manhattan distance. Well, that's clearly wrong as the arguments to b3Select are the volume boxes for the new leaf, left and right nodes.

The SSE intrinsics in the b3Select function are a bit confusing.

So, could anyone here shed some light on what b3Select calculates, and the relationship between a node and its two child nodes.

Thanks