[ODE] tri-list and new collision

Nate W coding at natew.com
Sat May 24 03:16:02 2003


I've been looking into the problem with boxes and trilists with the new
collision code, and I think I found the problem.  

dcTriListCollider::CollideBox passes a tri-list dGeom-derived object as
the "o2" parameter of a call to dCollideBoxPlane (formerly dCollideBP).  
dCollideBoxPlane is expecting a dxPlane object, from which it gets the
plane's normal vector as follows:

	dxPlane *plane = (dxPlane*) o2;
	const dReal *n = plane->p;

It appears that dxTriList is no longer laid out in memory just like
dxPlane, so the attempt to get the normal vector just returns garbage.  
If anyone has thoughts on the right way to fix this problem, I'm all ears.  
I'll take a stab at it tomorrow in any case.

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com