[ODE] Quaternion performance issues?
Bill Sellers
wis at mac.com
Sat Oct 15 18:50:56 MST 2005
Hi All,
I've implemented some custom code for applying forces and it's
working fine. However I've just been doing some profiling and it it
takes quite a large chunk of the simulation time doing various
rotations. I've implemented these rotations using quaternions getting
the values from dBodyGetQuaternion but obviously I could just as
easily redo the whole thing using matrices and dBodyGetRotation. Has
anyone any opinion about whether it would make any difference to the
calculation time? Is there any overhead in ODE associated with these
calls or does ODE maintain both sets of rotation information for a
body, and is there much difference in calculation speed of quaternion
rotations versus matrix ones?
Cheers
Bill
PS. The main reason I prefer quaternions is that they are usually
fairly unambiguously documented. With matrices I always have to dig
through lots of literature to find out whether they are stored in row
major or column major format. It's a little thing I know but I find
3D rotations hard enough to debug as it is without any extra layers
of uncertainty.
More information about the ODE
mailing list