skapunch/box2d

Make b2DynamicTree not use globals

Closed this issue · 1 comments

b2DynamicTree uses two globals b2_aabbExtension and b2_aabbExtension. This 
makes the class hard to use for custom scenarios outside of box2D whilst also 
using box2D. This class is documented in the manual so I assume it is meant for 
public use.

Attached patch adds member variables m_aabbExtension and m_aabbExtension which 
are set as arguments in the b2DynamicTree constructor. Default operation is to 
use aabbExtension and b2_aabbExtension.

Original issue reported on code.google.com by zzymyn on 11 Dec 2011 at 11:17

Attachments:

I'm not sure if I should make this change. It will slightly slow down the tree 
for most users. You could make a copy of the two files and change the constants 
(not globals).

Original comment by erinca...@gmail.com on 17 Mar 2012 at 6:01

  • Changed state: WontFix