Game Development Reference
In-Depth Information
ining how Bullet manages memory allocation, provides the algorithms for solving
various collisions (box-box, sphere-box, and so on), and how to manage the data
that comes out of the broad phase collision detection called
Manifolds
(we will ex-
For this project, we'll keep things simple and use Bullet's default collision configura-
tion object,
btDefaultCollisionConfiguration
.
The collision dispatcher
The
collision dispatcher
, as the name implies, dispatches collisions into our applic-
ation. For a video game, it is practically guaranteed that we will want to be informed
of inter-object collision at some point, and this is the purpose of the collision dis-
patcher.
One of the built-in collision dispatcher class definitions that come with Bullet is the
basic
btCollisionDispatcher
. The only requirement is that it must be fed with
the collision configuration object in its constructor (which forces us to create this ob-
ject second).
The constraint solver
The constraint solver's job is to make our objects respond to specific constraints. We
will learn more about the constraints in
Chapter 5
,
Raycasting and Constraints
. We
will be using
btSequentialImpulseConstraintSolver
for our project.
Note
Note that our application class will be derived from and customized in the
BasicDemo
class for the next several chapters. This keeps our application layer
code isolated from our physics/game logic.
Each of the components described previously can be customized to fit our needs; for
instance, we might be working within extremely tight memory requirements (such as
a mobile device), and so we might consider completely replacing the stack allocator
with our own to optimize Bullet's memory allocation processes.
Search WWH ::
Custom Search