[ODE] Four little things
Russ Smith
russ at q12.org
Tue Apr 20 12:36:53 MST 2004
hi matt,
> Thing 3:
> There also appears to be a minor bug in dJointGetBody(). It looks
> like it's the only remaining API function that does not respect
> dJOINT_REVERSE. (It's over in ode.cpp rather than with most of the
> others in joint.cpp, so it's easy to see how it got missed. Or does
> this function expose the Bodys in ODE-internal order intentionally?
> In that case this would be a documentation bug, if not an API bug,
> because that's definitely not what the user will expect.
okay, i've fixed it (and made the documentation for this function
clearer). for a sanity check, can you verify that this is what you had
in mind:
dBodyID dJointGetBody (dxJoint *joint, int index)
{
dAASSERT (joint);
if (index == 0 || index == 1) {
if (joint->flags & dJOINT_REVERSE)
return joint->node[1-index].body;
else return joint->node[index].body;
}
else return 0;
}
russ.
--
Russell Smith
http://www.q12.org
More information about the ODE
mailing list