[ODE] SAP space (was: Large physics worlds...)

Aras Pranckevicius nearaz at gmail.com
Mon Apr 25 11:57:46 MST 2005


> > Should I package the patch again, and maybe submit/upload it somewhere?
> >
> I know I for one would love to try it out...  Are there any major
> issues with it?

Ok, here goes the sweep-and-prune space for ODE:
http://nesnausk.org/nearaz/files/ode-sapspace-050425.zip (30kb).

It's not a patch, as I don't have diff/patch right now and am too lazy
to get them. Some readme is included; basically it's one new cpp file
and a couple of lines added to ODE include files. Should be pretty
basic to integrate.

Now, about it:

* Does complete re-sort on each collide call. That is, no temporal
coherence of any kind. The good side of this is that it handles very
fast moving things well.

* Has no collide2 implemented :(

* Depends on Opcode sources being present (collision_sapspace.cpp
includes Opcode.h and uses radix sorter from there).

* Uses radix sort for the sweep phase. Uses single precision floats
internally (ODE can still use doubles), which I think must be standard
IEEE floats (Opcode's radix sorter assumes IEEE floats). I think
that's not a problem on most platforms.


In my own usage scenarios, I've seen SAP either beating other spaces
by large amount, or beating them by small amount :) YMMV.


-- 
Aras 'NeARAZ' Pranckevicius
http://nesnausk.org/nearaz | http://nearaz.blogspot.com



More information about the ODE mailing list