b2World has only 2 parameters?

In the tutorials on how to create your world you have to fill in 3 parameters.

1. Size of the world.
2. Gravity.
3. Ignore Sleeping Objects

Now I have the latest version of Box2d and it only lets me fill in the gravity and ignore sleeping objects. So how do I set the size of the world?
you don't need to set the world bounds in the new version.
the world adjusts its size to accomodate all the bodies within its bounds.
vitaLee wrote:
you don't need to set the world bounds in the new version.
the world adjusts its size to accomodate all the bodies within its bounds.

Ah okay, but what does BroadPhase do then? I saw it somewhere and I thought it was to set the boundaries.
This is the code I have have now for the world:

Code:
         //Set up the size of the world
         var worldSize:b2AABB = new b2AABB();
         worldSize.lowerBound.Set(-3000 / RATIO, -3000 / RATIO);
         worldSize.upperBound.Set(3000 / RATIO, 3000 / RATIO);
         
         //Setup gravity
         var gravity:b2Vec2 = new b2Vec2(0, 9.8);
         
         //Ignore sleeping objects
         var ignoreSLeeping:Boolean = true;
         
         //Create world
         objWorld = new b2World(gravity, ignoreSLeeping);
         objWorld.SetBroadPhase(new b2BroadPhase(worldSize));
That's advanced usage. You don't need it.
BorisTheBrave wrote:
That's advanced usage. You don't need it.

Ah so it's for those of us that are more experienced with Box2d and want to be efficient with the memory. Thanks for the info!
Not really. The old broadphase used a Sweep and Sort( Sweep and Prune? Not sure if there is a difference ) algorithm for culling. The new broadphase( and the default one ) is a dynamic tree structure. Both have their uses and situations where they excell, and that is really the only reason you'd want to switch them.
Ah, this had confused me too! Wiki should really be updated to reflect this...

Original thread: https://box2d.org/forum/viewtopic.php?t=4672