I'm looking into one bug I'd like to see resolved before the final release. Many
of the examples now allow you to hit the Delete key to reset the physics
simulation to its initial state. This works fine on Windows for everything, but
on OS X it works for all the examples *except* the osgbpp app.
I also want to get the new osgbInteraction event handlers documented with
Doxygen. Then I'm ready for a release, unless something comes up I don't know
about yet.
Please test and report back here as time allows. I would appreciate any
feedback. Thanks!
-Paul
osgBullet v2.00.00 Release Notes
v2.00.00 is not backwards-compatible with osgBullet v1.xx. osgBullet-based
applications and projects will need to port their code to the new version.
Changes from v1.01.00 to v2.00.00 include the following:
* The osgbBullet library has been replaced with two libraries: osgbCollision and
osgbDynamics. Your project will need to link with the new libraries. The
v2.00.00 contains an analogous change in the namespaces and header file
directory structure.
* By linking with osgbCollision, your osgBullet application can use Bullet for
collision detection without a dependency on libBulletDynamics. The new
collision example program demonstrates this usage.
* The OSGToCollada class has been replaced by new rigid body creation
convenience routines. See the osgbDynamics/RigidBody.h header file. Nearly all
of the examples and tests use the new interface.
A new library, osgbInteraction, has been added to allow user interaction with
the physics simulation. The library contains the following classes:
* The HandNode class features a fully articulated hand model that can be
driven by a data glove or keyboard. Support for the P5 data glove is provided.
* The DragHandler allows the user to drag rigid bodies using the mouse.
* The LaunchHandler allows the user to fire objects into the scene.
* The SaveRestoreHandler allows the user to capture the physics simulation at
a particular point in time, then restore back to the capture point.
* New examples demonstrate hinge and slider constraints.
* The MotionState class now exposes routines to convert between Bullet collision
object and OSG coordinates while correctly accounting for differences due to
center of mass and scaling.
* A new example, saverestore, demonstrates saving current physics state and
restoring from file.
* Many classes are now documented using Doxygen.
This turned out to be my old friend, "dynamic_cast succeeds on Windows but fails
on OS X." I was using a dynamic_cast to change a btCollisionObject* to a
btRigidBody*. Failed on OS X, worked on Windows. I changed the dynamic_cast to a
static_cast to get around it. This worries me; I've read a few forum discussion
on this issue, but I still don't understand what's going wrong here.
Anyhow, RC2 is now posted! Announcing on osg-users shortly...
-Paul
The addRigidBody overload that takes collision filters is in
btDiscreteDynamicsWorld, but I failed to dynamic_cast to that from
btDynamicsWorld before invoking that function. So this is one of those "how on
Earth did it work at all on other platforms" issues. Glad you caught it.
For the second one, I've been involved in some discussion at bulletphysics.org
that have led me to believe that I really want to remove and delete the
constraint, rather than just disable it. So I've updated the code to do that,
which removes the compatibility issue with isEnabled/setEnabled usage.
My changes are on the branch and on trunk. Please update and try again as time
allows.
I'm seeing an issue with the slider example only on Mac OS X: If I
ctrl-leftmouse and pull the drawer all the way out, then release the mouse
button to drop the drawer on the floor, it falls right through the floor and
doesn't collide. Not sure what's going wrong here, but it's obviously some kind
of problem with collision filters. I'll continue looking into it.
-Paul
On 10/17/2011 3:32 AM, Karrot wrote:
Actually, the filters are correct in the current code: the drawer and the stand
should *not* collide with each other. However, down at the bottom of the main
rendering loop, when I delete the constraint (because the drawer is pulled out),
I want to change the collision flags so that the drawer and stand *do* collide,
and this was where I was running into problems.
The solution I had in place -- directly modify the collision flags in the drawer
body's btBroadphaseProxy, seemed to work on Windows, but failed on OS X. I
struck up a conversation in the forum:
http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=7538
and have now modified the example to remove and add back the drawer body with
the new filters. Seems like kind of a kludge, but it works on both Windows and
OS X: when the drawer is pulled out, it now properly falls onto (and not
through) the floor.
About the only other thing I'd like to do before the next RC is limit the slider
demo depth map shadow to be centered around the nightstand. Digging into that now...
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/