[Haskell-cafe] Testing a collision detection system

mpevnev at gmail.com mpevnev at gmail.com
Sun Jul 29 09:08:56 UTC 2018


As a part of a project, I write a collision detection system. It is in
dire need of testing, but designing and writing tests for all possible
pairs of types of colliding geometry would be a pretty big effort - not
only I would have to calculate the fact of collision manually for
20-something pairs of types of colliding geometry, I would also have to
do so multiple times for each pair, since each pair requires several
test cases.

So the idea is to use an existing collision detection library to
generate (a lot of) test cases from random data. I've found two such
libraries for Haskell - HODE and Bullet. The problem is, Bullet bindings
aren't documented at all, and HODE (which isn't really documented
either, but at least lists available functions) is extremely ugly with
IO all over the place, and manual tracking of objects' lifetimes (at
least that's what I infer from `create :: World -> IO Body` and 
`destroyBody :: Body -> IO ()`, because again - no documentation).

So my question is: does anyone know a library I could use? I'll pretty
much settle for whatever.

-- 
Michail.


More information about the Haskell-Cafe mailing list