The code is now available:
http://github.com/Villane/scalabox2d/tree/masterHowever, please consider:
* it's for "early looks" only for now. The code needs clean-up and optimizing.
* no test-bed, that will come soon.
* it's currently slower than JBox2D (even 2 times slower, for example in the pyramid test while it hasn't settled)
* I'm investigating the performance issues, but it'll take time
Some notes about changes compared to JBox2D/Box2D
Packages:
vecmath
* put the vector/matrix math in a different package outside of "box2d", that should be also usable without the physics engine. Also renamed the classes, and everything in the "vecmath" package is immutable.
* separated box2d.collision into "collision" and "shapes" (seemed to many classes for one package). Not sure if I got everything right about that.
* moved DebugDraw to "draw" package
* "common" package has some currently unused classes
* a couple of other classes were renamed or moved to different packages as well, but the majority of the classes are named as before. If it helps, I could make a detailed list of all renames/moves.
Naming & code changes:
* removed lots of m_ prefixes from members. This caused some local variables to have the same name as members -- in those cases I shortened the local names.
* removed "get" from many method names.
* replaced some constants and variables with actual unicode greek letters, such as π, ε, α, ω. Not sure if it's a good idea, as these aren't exactly on most people's keyboard, but I left the spelled-out alternatives for any special characters in public methods or constants.
* named Mat22.mulT to ** . Not sure why I chose that, there is probably a better symbol for the operator, I just didn't come up with one when working on that so it kind of got left like that.
* Removed most of the semicolons, maybe that wasn't very smart as it's just more changes between the two versions. Looks more Scala-ish, though
Warning on operator precedence: special characters have the highest precedence in Scala (higher than * / ), letters have the lowest, so these are different:
a + b × c == a + (b × c)
a + b cross c == (a + b) cross c