- The Bullet wrapper has been updated to make it easier to work with in conjunction with the new 3D api. Due to this change, you might need to update your existing code that relies on the wrapper. I've tried to keep the API changes to a minimum. The main changes are:
- The delete() method has been replaced by the dispose() method, every wrapper class now extends the BulletBase class which implements Disposable. The BulletBase class also manages the life cycle of each wrapper class. And it logs an error when something might go wrong, e.g. when an object isn't properly disposed. Logging can be disabled using the arguments of the Bullet.init() method.
- The "M_" prefix in getter/setter methods has been removed (e.g. btCollisionObjectWrapper.getM_collisionObject() is changed to .getCollisionObject)
- The contact callback listeners (ContactAddedListenerXXX, ContactProcessedListenerXXX and ContactDestroyedListener) are merged into a single class ContactListener. The wrapper automatically detects which method(s) you've overridden (onContactAdded, onContactProcessed and/or onContactDestroyed). Contact filtering is now optional (depending on whether you override the method(s) with the match0 and match1 arguments).
- The btIndexedMesh, btTriangleIndexVertexArray and btBvhTriangleMeshShape classes are refactored for use with the new 3D api. Moreover the Bullet class provides static helper methods to create a shape from Model Nodes. Additional methods will be added soon.
- Next to these changes, the wrapper is also updated with additional functionality that shouldn't break existing code. For example the wrapper now supports reference counting (disabled by default) and the onContactStarted and onContactEnded callbacks.
- See the wiki page (http://code.google.com/p/libgdx/wiki/PhysicsBullet) and this pull request (https://github.com/libgdx/libgdx/pull/544) for more information.
a guest Aug 22nd, 2013 24 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RAW Paste Data