Using a physics engine

In this recipe, we will extend our existing mesh renderer to support the simulation of physics within a scene. We will continue to use the built-in Visual Studio graphics content pipeline, and rely on a simple mesh naming convention to designate static and dynamic objects within our scene.

Getting ready

For our physics engine, we will use BulletSharp, a .NET wrapper of the popular Bullet Physics library used in many AAA game and movie titles. Consider the following steps:

  1. Download the BulletSharp library from https://code.google.com/p/bulletsharp/. It is also included in the \External folder within the downloadable content for this book.
  2. Add a reference to the \External\bulletsharp-2.82\Release SharpDX\BulletSharp.dll assembly. ...

Get Direct3D Rendering Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.