Functions

Rigid Body Creation

Convenience routines for creating Bullet rigid bodies from scene graphs. More...

Functions

OSGBDYNAMICS_EXPORT btRigidBody * osgbDynamics::createRigidBody (osgbDynamics::CreationRecord *cr)
 Creates a compound collision shape and rigid body from the CreationRecord data.
OSGBDYNAMICS_EXPORT btRigidBody * osgbDynamics::createRigidBody (osgbDynamics::CreationRecord *cr, btCollisionShape *shape)

Detailed Description

Convenience routines for creating Bullet rigid bodies from scene graphs.

These functions use the CreationRecord struct to create collision shapes, rigid bodies, and motion state objects. The application is responsible for setting the CreationRecord fields as needed. The fields are used as follows:

Note that these are merely convenience routines, and your application can interface directly with Bullet to create collision shapes and rigid bodies. However, you should strongly consider using these convenience routines for the following reasons:

Requirements

Functionality Removed in v2.0


Function Documentation

btRigidBody * osgbDynamics::createRigidBody ( osgbDynamics::CreationRecord cr )

Creates a compound collision shape and rigid body from the CreationRecord data.

Uses the osgbCollision::ComputeShapeVisitor to create a btCompoundShape from CreationRecord::_sceneGraph. Currently, a shape per Geode is created. CreationRecord::_shapeType specifies the shape type created per Geode. If CreationRecord::_shapeType is CYLINDER_SHAPE_PROXYTYPE, CreationRecord::_axis specifies the cylinder major axis.

btRigidBody * osgbDynamics::createRigidBody ( osgbDynamics::CreationRecord cr,
btCollisionShape *  shape 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Use this function to create a rigid body if you have already created the collision shape. This is useful for sharing collision shapes.