Box2D Version 2.0.1 Released

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/
Wow, that's quite a lot of stuff there. I take it that the revision 148 is the correct one to use?
Yeah, revision 148.
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. (:
oh 😮
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
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.
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
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.
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! 😉
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.

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