Hi all,
I've been working on some animation code lately. To achieve smooth character
animation, I've been using a two-frame Interpolator: When a new character
animation state is desired (i.e. when, in the midst of taking a step, a
character ducks), I'm setting the second frame to target transform (duck)
and t=1, while setting the first frame to *the current transform* and t=0.
This way, I can virtually morph two animations together. Problem is, while
one can easily determine translation and scale of a transform, its
non-trivial to get the rotational components.
What I want is
public KBKeyFrame getTransform3DToKBKeyFrame(Transform3D a_xform)
{
(...)
}
My problem is that the KBKeyFrame specifies its HPB parameters as euler
angles, while the transform can provide rotational components only in matrix
or in quaternion form. Now there are several ways to get from Eulers to
Matrix/Quat or vice versa, and nowhere it is specified exactly how the
KBKeyFrame does that. I assume the setEuler() call in Transform3D is exactly
for that. Unfortunately, there is no getEuler().
So my question is,
How do I get from Transform3D.get(Quat4d) or from Transform3D.get(Matrix3d)
to H/P/B Euler angles as used by KBKeyFrame?
Thanks a lot in advance
Wolfgang Kienreich
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".