Personal tools

Bullet

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
 
(Installation)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Bullet is a professional open source multi-threaded 3D Collision Detection and Rigid Body Dynamics Library. It is free for commercial use under the ZLib license.
+
== Overview ==
   
Bullet is a C++ library.
+
[http://www.bulletphysics.com/Bullet/wordpress/bullet 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.
Here is a haskell wrapper and an example for it.
+
  +
== Installation ==
  +
  +
A cabalised wrapper is available: http://hackage.haskell.org/package/bullet
  +
  +
The source repository is on github: https://github.com/csabahruska/bullet
  +
  +
Note that you have to install the library before installing the package:
  +
  +
svn checkout http://bullet.googlecode.com/svn/trunk/@2440 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')
  +
make
  +
sudo make install
  +
  +
Now you can install the Haskell binding:
  +
  +
cabal install bullet
  +
  +
== Todo ==
  +
  +
* vehicle interface
  +
* constraints
  +
* soft body system
  +
  +
== 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
  +
./BulletExample
  +
  +
You can use the arrows to navigate the scene and P to pause/unpause.
  +
  +
[[Image:Bullet-example-1.png]]
  +
  +
[[Image:Bullet-example-2.png]]
  +
  +
  +
== Combining LambdaCube and Bullet ==
  +
  +
Hackage contains an example for combining LambdaCube and Bullet:
  +
[http://hackage.haskell.org/package/lambdacube-bullet lambdacube-bullet]
  +
  +
  +
[[Category:Packages]]
  +
[[Category:Games]]
  +
[[Category:Libraries]]

Latest revision as of 18:47, 27 April 2013

Contents

[edit] 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.

[edit] 2 Installation

A cabalised wrapper is available: http://hackage.haskell.org/package/bullet

The source repository is on github: https://github.com/csabahruska/bullet

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

svn checkout http://bullet.googlecode.com/svn/trunk/@2440 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')
make
sudo make install

Now you can install the Haskell binding:

cabal install bullet

[edit] 3 Todo

  • vehicle interface
  • constraints
  • soft body system

[edit] 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
./BulletExample

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

Bullet-example-1.png

Bullet-example-2.png


[edit] 5 Combining LambdaCube and Bullet

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