[ODE] dxHashSpace::collide2

Clint Brewer clint at haptek.com
Tue May 6 01:40:09 2003


Adam D. Moss wrote:

> Clint Brewer wrote:
>
>> just in case somebody has done this already :)
>
>
> Naive implementation attached.  It works, but this implementation
> is no faster than collide2 on a SimpleSpace.  I've posted this
> to the list before.


thanks Adam,
looks like I sent this to myself earlier today and not to the list.
snip--------------------------------
found it in the archives

subject: [ODE] dxHashSpace::collide2
author: Adam D. Moss aspirin at ntlworld.com 
<mailto:aspirin%20at%20ntlworld.com>
date: Tue Jan 28 11:45:02 2003


Adam had said that "I implemented dxHashSpace::collide2() in the O(n^2) 
manner "
but luckily it's O(n)
so that's not too bad.  Better than throwing my frustum into the space 
and calling dSpaceCollide on it again.

-c
snip-------------------------------

I guess I'll make an change to that and say It's O(m*n)  where m is 
number of objects in in the first space, which for me is just one the 
frustum, so it's a nice O(n)

I put the code in and built a new lib.  Then I retrofitted my old 
frustum to be  an ode geometry class ..and I'm almost there,  just one 
more strange bug to track down right now...well after I sleep.

thanks again Adam, I appreciate it.

I'd love for this simple collide2 to be included in the next ode release 
of the hash space.  It's still better overall than using the simple 
space for me, and necessary for what I'm doing. 
-c