[ODE] Re: Thanks and a potential bug

Russ Smith russ at q12.org
Mon Nov 12 19:02:02 MST 2001


Ruud van Gaal wrote:
> 
> Hi Russell,
> 
> Thanks for creating the ODE library; I'm creating a free car simulation, Racer,
> and the things that I'm worst at is the rough math involved in collision
> detection. I just found out about ODE 2 days ago, and it looks very clean and
> useful. Hope to get some stuff compiling so I can see how it would fit into the
> code I already have.
> 
> While reviewing your code, I noticed in geom.cpp in dCreateGeomClass() that you
> allocate an n^2 array of function pointers for everytype-everytype collisions.
> However, I was wondering if you'd add 2 classes, if the array of function
> pointers wouldn't overflow silently in the following dCollide(). But you may
> have thought of that, although the code looks like after 2 new classes it just
> tries to obtain function ptrs, and the array in the 1st new class wouldn't be
> large enough.

each time dCreateGeomClass() is called it expands the colliders array to
size n^2. the array is zeroed, then filled again each time dCollide() is
called. so actually there is a potential bug here if dCreateGeomClass() 
in called *during* a dCollide() ... although it is unlikely a user will 
do this. is this the problem you are referring to?

> Glad to see a dynamics library of this quality though; I was just about to
> start rewriting my physics code to match most of Baraff's papers (which use
> momentum, L, rather than angular velocity). Now it seems I have to get ODE
> working properly and I'll probably use that instead, since I couldn't do the
> constraint math myself just like that (I'm more into effects, GUIs, gameplay,
> graphics).
> 
> Thanks again,

you're welcome!

russ.

> Ruud van Gaal
> PS The carsim is at http://www.marketgraph.nl/gallery/racer/ if you're
> interested. Getting good reviews. :)

--
Russell Smith
http://www.q12.org



More information about the ODE mailing list