[ODE] Help with rotations

Lewis Foster doof205 at gmail.com
Wed Dec 13 07:16:52 MST 2006


I'm just getting into ODE, having a play with some simple programs but im
struggling with some of the rotations. Admittedly my maths isn't fantastic
and it's been a few years since I studied any.

I'm trying to get my head around the ways to rotate something in the way I
want to. For example I have a box lying on the floor, i want to rotate 90
degrees about the Z axis, and then 90 degrees about the Y axis.

Now I can see that the folllowing rotates by 90 degrees (ish) about the z
axis:

dRFromAxisAndAngle (bookRotation,0,0,1,1.55);     //1.55 radians is roughly
90degrees

But I can't see how to get it to rotate about the Y axis by 90degrees as
well. I'm not sure how the dReal values, x, y and z relate to the amount of
rotation.

Alternatively it seems theres another method in the documentation:

void dRFrom2Axes(dMatrix3 R, dReal ax, dReal ay, dReal az, dReal bx, dReal
by, dReal bz);

But I dont see how this works at all, how much does it rotate by?

Is there any further documentation other than the latest userguide? And with
regards this subject, can anyone recommend a good book?

Thanks,

Lewis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20061213/5f178359/attachment.htm


More information about the ODE mailing list