[ODE] quat to eulerXYZ
cr88192 at hotmail.com
Mon Jun 27 09:24:01 MST 2005
----- Original Message -----
From: "Patrick Enoch" <Hendrix_ at gmx.net>
To: <ode at q12.org>
Sent: Sunday, June 26, 2005 11:20 AM
Subject: Re: [ODE] quat to eulerXYZ
> these conversions work (for your physics engine maybe):
cool. these are apparently somewhat simpler than the ones I had imagined as
issue, though, these appear to be raw angular converters, which are
apparently not what the op wanted. I guess a problem is that euler angular
velocity is in itself ugly, likely restricted to systems that use euler
angles (quake and quake2 come to mind here).
for small angular velocities, this may not make much difference, but I feel
the problem is likely to be with large angular velocities (>=PI/2t), in
which case it may become arbitrary. assuming a plain converter like this
though, an easy fix would be scaling the rotation prior to conversion, and
scaling the output.
void AvelToEularXYZ(float *av, float *ang)
float q, n, a, l;
QuatF_FromAxis(n, 0.5, q);
Vec3F_Scale(a, l*2, ang);
ok, maybe I can adapt them for my uses (hmm, they can go somewhere, doubtful
in the physics engine itself as it likes to be opaque to the level of not
exposing things of this sort). may go in my 3d engine stuff though, this was
intended to be much less opaque (and has other stuff, eg, a large usable set
of math functions).
as for my physics engine: presently noting some more weirdness, this time it
is that, apparently, I can't really get friction to work (having now, sort
of, getting both normal and resting contacts to work adequately).
another mystery: sliding objects will rotate sometimes, apparently lifting
themselves up against gravity (or will be spinning quickly and more behave
like a sphere). often the object will end up rotating against the surface it
is sliding on. this just looks wrong.
(realization: friction update involves an extra step, and I was failing to
perform the update correctly, may fix).
More information about the ODE