[ODE] Patches

Jaroslav Sinecky jsinecky at tiscali.cz
Mon Dec 12 04:08:57 MST 2005



> -----Original Message-----
> From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf
> Of Marco Grubert
> Sent: Thursday, December 08, 2005 2:59 AM
> To: ode at q12.org
> Subject: [ODE] Patches
>
>
> Just downloaded the latest UNSTABLE revision and my earlier patch did not
> make it in. If some moderator could contribute these changes, please...
> -----------------------------------------------------
> i:\temp\ode\ode\src\collision_trimesh_sphere.cpp
> L252  if (Dist <= Radius){
>                 //Dist= Radius - Dist;
>                 Dist= Radius - side; //(mg) penetration depth is distance
> along normal not shortest distance
>                 return true;
>             }
>

Where did this patch appear? Did it go through the mail list? Also I didn't
find it in the SF patch manager. Just asking because I think it's good to be
informed of changes like this, maybe someone can comment on this or we can
suspect something if things stop working after checking out last UNSTABLE.

Particulary this one changes the depth value in every trimesh-sphere contact
which is a thing a lot of people have been using for a long time without
problems. What I see odd about this change is: if you imagine sphere deaply
penetrated in triangle's plane approaching to some triangle's edge from
outside, in the moment when it touches the edge, the depth value will jump
sudenly from zero (ie. not colliding) to some larger positive value which is
probably not ok.
I agree that if we use triangle's plane normal for contact normal, then the
depth calculation isn't very reasonable. If we really need to change it, I
would suggest calculating the distance that we have to move the sphere along
triangle's normal to depenetrate them. Which shouldn't be complicated
(thanks to Pythagoras and the fact that we know u,v coordinates of the most
deeply penetrated point on triangle)


Completly out of topic: looking at the code I think we could improve early
exit test at line 55:

--	if(side < 0.0f) {
++	if(side < 0.0f || side > Radius) {
		return false;
        }


Jaroslav



More information about the ODE mailing list