[ODE] Preventing contacts between connected bodies

Mark Williams mark at image-engine.com
Wed Nov 14 12:02:33 MST 2007


Brett Hemes wrote:
> Looking through the sample code I have noticed the following code in 
> the nearCallbacks:
>
> dBodyID b1 = dGeomGetBody(o1);
> dBodyID b2 = dGeomGetBody(o2);
> if (b1 && b2 && dAreConnected(b1, b2)) 
> return;
>
> and
>
> dBodyID b1 = dGeomGetBody(o1);
> dBodyID b2 = dGeomGetBody(o2);
> if (b1 && b2 && dAreConnectedExcluding (b1,b2,dJointTypeContact))
> return;
>  
> The benefit of the second is not completely clear to me.

I guess the second would allow multiple contacts to be generated between 
colliding bodies, whereas the first would not.

Cheers,
Mark


More information about the ODE mailing list