bullet
bullet copied to clipboard
Haskell binding for Bullet physics engine
Haskell binding for Bullet physics engine.
Binding for bullet-2.79.
Compile
- download and extract bullet physics source code: bullet-2.79-rev2440.zip
unzip bullet-2.79-rev2440.zip
- compile and install the library:
cd bullet-2.79
cmake . -DBUILD_DEMOS=NO (on OSX for 32 bit GHC also add -DCMAKE_OSX_ARCHITECTURES='i386')
make
sudo make install
on Ubuntu 16.04 x64 bullet compiles with:
cmake . -DBUILD_SHARED_LIBS=off -DBUILD_DEMOS=off -DCMAKE_CXX_FLAGS="-fPIC -Wno-narrowing" -DCMAKE_C_FLAGS="-fPIC -Wno-narrowing" -DINSTALL_LIBS=on
make -j4
-
compile and install the haskell bullet binding:
cabal install(run command in the bullet.cabal's directory) -
compile and run the example (needs OpenGL and GLUT):
cd Examples
ghc --make -O2 BulletExample
./BulletExample
Howto generate binding
- copy and run
prepareHeaders.hsexecutable tobullet/src - move the generated bullet directory to bullet binding directory
- from
cbitsfolder copyHaskellBulletAPI.handGLDebugDrawer.hto generatedbulletfolder and copybullet.pyto generatedbulletfolder also - execute
bullet.pyin bullet directory - copy generated files
Physicsdirectory to binding directory- Bullet.[h/cpp] to
cbitsdirectory