libgdx/libgdx — pull request #473 by xoppa (2013-06-13 23:11:51+00:00)
Title: Bullet & 3D: various

This includes https://github.com/libgdx/libgdx/pull/469 (Model/ModelInstance common methods) and https://github.com/libgdx/libgdx/pull/471 (SoftMeshTest).

Add a convenience constructor to ModelInstance to create a model from a single node and optionally set its transform as modeled (like I manually did in the loading a scene tutorial).

Add a VehicleTest to the bullet tests.

Include bullet/extras/serialize, practically allowing to import .bullet files. This allows you to create a whole scene including physics properties within blender/maya, export it to .fbx/.bullet and load it in game. I added a test to show the usage. It also allows to easily create node based animation for kinematics bodies and gpu skinned physics ragdolls (I'll probably add a test to show that later).

Fix and cleanup bullet tests (they didnt properly disposed the models).

Note that bullet/serialize requires std::string, which for android requires STL to be added to application.mk (APP_STL := stlport_static), I couldn't find a way to do that with gdx-jnigen, so I added that manually.

Tested on win64 and android.

My experience on building a bullet scene:
- The default bullet plugin for maya is great for the purpose but doesn't export node names, so its impossible to know which model-node belongs to which bullet body.
- The (walt disney?) opensource maya bullet dynamica plugin is somewhat restricted and requires some customization, but for most scenes it will do
- The blender bullet plugin looks great and by far the best, but since blender uses z-up you must manually rotate the bullet world after importing for y-up.