Personal tools


From HaskellWiki

Revision as of 18:47, 27 April 2013 by Hcube (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


1 Overview

Bullet is a professional open source multi-threaded 3D Collision Detection and Rigid Body Dynamics Library written in C++. It is free for commercial use under the zlib license.

2 Installation

A cabalised wrapper is available:

The source repository is on github:

Note that you have to install the library before installing the package:

svn checkout bullet-read-only-2.79
cd bullet-read-only-2.79
cmake . -DBUILD_DEMOS=NO (on OSX for 32 bit GHC also add -DCMAKE_OSX_ARCHITECTURES='i386')
sudo make install

Now you can install the Haskell binding:

cabal install bullet

3 Todo

  • vehicle interface
  • constraints
  • soft body system

4 OpenGL example

The example on the screenshot below can be found in the package. You have to compile it by hand. Make sure that OpenGL and GLUT is installed, then enjoy:

cabal unpack bullet
cd bullet-x.x.x/Examples
ghc --make -O2 BulletExample

You can use the arrows to navigate the scene and P to pause/unpause.



5 Combining LambdaCube and Bullet

Hackage contains an example for combining LambdaCube and Bullet: lambdacube-bullet