osgbpp creates rigid bodies from OSG data and drops them on a platform. Use this application to test rigid body creation with a variety of control parameters.
Use osgbpp to create a rigid body from dice.osg, one of the osgBullet data files:
C:\Projects>osgbpp dice.osg
To see the model fall again, hit the Delete key. To drag the model, hold down the control key and use the left mouse button.
By default, osgbpp creates a Bullet box collision shape. You can visualize the collision shape with the --debug command line option:
C:\Projects>osgbpp dice.osg --debug
osgbpp supports command line patameters to control the collision shape type. For example:
C:\Projects>osgbpp dice.osg --debug --cylinder C:\Projects>osgbpp dice.osg --debug --convexHull
osgbpp lets you specify a non-origin center of mass with the --com command line option. For example, you can simulate a loaded die with this command:
C:\Projects>osgbpp dice.osg --com 1.1,0,0
osgBullet can create a compound shape from Geodes in your scene graph, or can create a single non-compound shape encompassing your entire scene graph. Use the --overall option to create a single non-compound shape.
For example, compare the results of these two commands:
C:\Projects>osgbpp dice.osg block.osg.(2,0,2.5).trans C:\Projects>osgbpp dice.osg block.osg.(2,0,2.5).trans --overall
In the first command, osgBullet creates two box shapes, one for each model, and assebled them into a single btCompoundShape. In the second example, osgBullet creates a single box shape around both models.
| --axis <a> | Use this option to specify the cylinder axis X, Y, or Z. Default is Z. This argument is ignored if --cylinder is not specified. |
| --box | This is the default. Creates a box collision shape. |
| --com <x>,<y>,<z> | Specifies the center of mass. If not specified, osgbpp uses the center of the OSG bounding sphere. Example: --com 5.5,3,-1. Do not include spaces in the center of mass vector. |
| --convexHull | Creates a convex hull collision shape. |
| --convexTM | Creates a convex tri mesh collision shape. |
| --cylinder | Creates a cylinder collision shape. See the --axis parameter. |
| --debug | Use the GLDebugDrawer class to display collision shapes. |
| --mass <n> | Specifies the desired rigid body mass value. The default is 1.0. |
| --overall | Creates a single collision shape for the entire input scene graph, rather than a collision shape per Geode, which is the default. |
| --sphere | Creates a sphere collision shape. |
| --triMesh | It creates a tri mesh collision shape (suitable for static objects). |
| -v/--version | Display the osgBullet version string. |
| -h/--help | Displays help text and command line documentation. |
1.7.2