Box2D Version 2.0.1 Released

News about Box2D
Erin Catto
Site Admin
Posts: 2948
Joined: Thu Sep 06, 2007 12:34 am

Box2D Version 2.0.1 Released

Postby Erin Catto » Sun Apr 13, 2008 3:50 pm

2.0.1
- Theo Jansen walker example.
- Added SetUserData accessors.
- Added ContactCallbackTest. Thanks caspin!
- Fixed circle-vs-polygon contact id handling.
- Updated API document.
- Minor changes to contact listener (added const, result -> point).
- Updated manual to account for recent changes.
- Applied ElasticBody.h update (thanks nimodo)
- Changed listener/filter assignment function names per ewjordan.
- b2ContactListener now has: Add, Persist, Remove, and Result. Solver contact point results are now split so that paused simulations get all contact point Add, Persist, and Remove results.
- Made much internal data protected/private to reduce user error.
- Added soft distance joint. See Web example.
- Fix: polygon ray cast.
- Turned off range assert in b2Shape::ResetProxy.
- Applied fixed-point patch update.
- Added shape re-filtering.
- Fix: wakeup associated bodies if the number of contacts points goes from positive to zero.
- Changed some VC8 project settings: turned off C++ exceptions to improve performance.
- Fixed typo in manual.
- Fixed joint destruction on frozen bodies (thanks mewse).
- Improved contact solver performance (current bottleneck in pyramid demo).
- Fixed bug where warm starting was disabled if you have no contact listener installed (thanks Digicrab!).
- Trying out 0xfb's (Frank's) contact solver modification.

Please see these resources:
- manual.html
- API.chm
- TODO.txt
- example code
- Readme.txt
- Project site: http://www.box2d.org
- File/SVN host: http://sourceforge.net/projects/box2d
- Wiki: http://www.box2d.org/wiki/
- Forum: http://www.box2d.org/forum/

BorisTheBrave
Posts: 1911
Joined: Mon Jan 07, 2008 10:51 am
Contact:

Re: Box2D Version 2.0.1 Released

Postby BorisTheBrave » Sun Apr 13, 2008 6:34 pm

Wow, that's quite a lot of stuff there. I take it that the revision 148 is the correct one to use?

Erin Catto
Site Admin
Posts: 2948
Joined: Thu Sep 06, 2007 12:34 am

Re: Box2D Version 2.0.1 Released

Postby Erin Catto » Sun Apr 13, 2008 9:31 pm

Yeah, revision 148.

skatehead
Posts: 131
Joined: Tue Sep 25, 2007 1:45 am

Re: Box2D Version 2.0.1 Released

Postby skatehead » Mon Apr 14, 2008 3:23 am

Nice work as always Erin, I love the elastic body demo!,
but now I'm a version behind :P

Guess I'd better release 2.0.0 and get started on this. (:

snake5
Posts: 118
Joined: Tue Mar 04, 2008 11:19 am

Re: Box2D Version 2.0.1 Released

Postby snake5 » Mon Apr 14, 2008 8:48 am

oh :o
what did you do with public/private stuff?
I can see it's written in a hurry..
it's not fast setting all of mass properties rather than mass only if i need that!
also I can't see a point for pushing filter data out and setting all of the filter data at once!
what if I need to set group index only?

please think about this and tell me why did you make everything like this

Erin Catto
Site Admin
Posts: 2948
Joined: Thu Sep 06, 2007 12:34 am

Re: Box2D Version 2.0.1 Released

Postby Erin Catto » Mon Apr 14, 2008 10:29 am

snake5: I added the public/private qualifiers to make it clear to users what is the API and what is internal. When users start using internal data without a clear understanding it can cause me a great deal of difficulty supporting the engine. Remember, I am doing Box2D as a hobby and I have a full-time job as well as family life that keeps me quite busy.

Using accessors can slightly worsen performance in some cases, but it should help me support Box2D more effectively.

If you find a significant performance bottleneck that you think can be improved, please post a bug report with a test bed example and/or a patch. Remember, Box2D is an open source project and we gladly accept user contributions.

snake5
Posts: 118
Joined: Tue Mar 04, 2008 11:19 am

Re: Box2D Version 2.0.1 Released

Postby snake5 » Mon Apr 14, 2008 11:20 am

I'm not against the public/private things
I just wonder why should I set mass and inertia at once because they do different things

Erin Catto
Site Admin
Posts: 2948
Joined: Thu Sep 06, 2007 12:34 am

Re: Box2D Version 2.0.1 Released

Postby Erin Catto » Mon Apr 14, 2008 12:49 pm

Well, one could make a similar argument that each entry of a position vector does different things, so why can't you set the position of a body one coordinate at a time?

The mass and rotational inertia scale with each other, so they are by definition dependent on each other.

snake5
Posts: 118
Joined: Tue Mar 04, 2008 11:19 am

Re: Box2D Version 2.0.1 Released

Postby snake5 » Mon Apr 14, 2008 2:03 pm

but there's the same problem with vectors! :)
that's why x and y are not private variables!
mass and inertia may depend on each other, but changing one means changing something different from changing other!

but this is not so bad as with filter data.. if I use group index, I don't necessary want to set category and mask bits and vice versa
I think this can be easily fixed by removing the "const" modifier before GetFilterData function so it would return just a reference to filter data, and then I could modify the data without setting it with SetFilterData again! ;)

Erin Catto
Site Admin
Posts: 2948
Joined: Thu Sep 06, 2007 12:34 am

Re: Box2D Version 2.0.1 Released

Postby Erin Catto » Mon Apr 14, 2008 3:54 pm

I don't understand your problem with filter data. Why not use something like the following?

Code: Select all

dmFilterData filter = myShape->GetFilterData();
filter.groupIndex = newValue;
myShape->SetFilterData(filter):
myWorld->Refilter(myShape);


This keeps the same mask and category bits.


Return to “News”



Who is online

Users browsing this forum: No registered users and 2 guests