SimulDeck
type: Physics/Collision simulation
language/API: C++/DirectX8.1
School project (diploma thesis) finished in summer 2004.
SimulDeck uses simple Newton formulas to deal with mass/forces/velocities
in order to simulate real physical behaviour of objects. For collision detection
was used sphere tree approach, where every object in scene is wrapped into hierarchy
of spheres. Spheres were used because of its simple shape (orientation independent)
and thus allowing really fast collision detection just by checking distances
between centers of spheres. Object is wrapped only by one bounding sphere (level 0),
this level 0 sphere contains bunch of level 1 child spheres that cover shape of object more accurately,
level 1 sphere contain level 2 child spheres and so on.
Precision of collision (and thus speed) can be controlled
by allowing collision checks only until certain level of sphere three.
And yes, it's not very bright idea to cover the cube with bunch of spheres.
|