[ODE] bug in amotorComputeGlobalAxes
Adam D. Moss
adam at gimp.org
Wed Sep 29 16:15:50 MST 2004
Geoff Carlton wrote:
> Hi,
> I've just noticed the relative-to-body1 mode in AMotor doesn't work, due
> to a bug in amotorComputeGlobalAxes. I don't have write access to cvs,
> but here is the patch if somebody wants apply the fix:
>
> @@ -2301,20 +2301,20 @@
> // relative to b1
> dMULTIPLY0_331 (ax[i],joint->node[0].body->R,joint->axis[i]);
> }
> - if (joint->rel[i] == 2) {
> + else if (joint->rel[i] == 2) {
> // relative to b2
> if (joint->node[1].body) { // jds: don't assert, just ignore
> dMULTIPLY0_331 (ax[i],joint->node[1].body->R,joint->axis[i]);
Hi there.
I'm a bit confused about why this would change anything at all.
The existing code is:
if (joint->rel[i] == 1) {
// relative to b1
dMULTIPLY0_331 (ax[i],joint->node[0].body->R,joint->axis[i]);
}
if (joint->rel[i] == 2) {
// relative to b2
if (joint->node[1].body) { // jds: don't assert, just ignore
dMULTIPLY0_331 (ax[i],joint->node[1].body->R,joint->axis[i]);
}
joint->rel[i] can't be 1 AND 2, and the first case wouldn't change
this value before it gets to the second case.
Am I missing something?
--Adam
More information about the ODE
mailing list