About Rigid Body Simulation

In physics, a rigid body is a representation of a solid object in which deformation is neglected. In other words, the distance between any two given points of a rigid body remains constant regardless of external forces exerted on it. Rigid body simulation is used in video games as the core component of the physics engine.

Numerical Integration

Writing a rigid body simulation requires some reflection on numerical integration methods. I have included a PDF file that talks about the subject and contains my analysis of various integration methods. This analysis can also be found here. The method used in the library is the SUVAT method, although this can be changed by adjusting some #define statements.

The Library

The library consists of a few header files. The top level class is the RIGIDBODY class, and this class depends on some other math classes such as vector, matrix, and quaternion classes. In the download package there's also a test harness (use SCons to build the test application, if you're interested) that will run some unit tests on the library. You can look at the unit tests by looking at the .cpp files, which also provides a way to understand how the library should be used. The library is distributed under the terms of the BSD-style license provided with the distribution. The unittest.h file is the work of Tyler Streeter and is distributed under a separate license as stated in that file.