I hit this exact same piece of code several months back and sent a
message as well. I thought they had fixed it by now. Here's what I
did:
I had to make my own package using their code, but changed that area of
code to:
// TODO: Vijay - Handle Non-Uniform scale
// Currently this interpolator does not handle non uniform
scale
// We cheat by just taking the x scale component
// sMat.set((double)iScale.x);
tMat.set(iQuat);
// tMat.mul(sMat);
// Set the translation components.
tMat.m03 = iPos.x;
tMat.m13 = iPos.y;
tMat.m23 = iPos.z;
rotation.set(tMat);
// construct a Transform3D from: axis * rotation *
axisInverse
temp.mul(axis, rotation);
temp.setScale(new Vector3d(iScale));
temp.mul(temp, axisInverse);
target.setTransform(temp);
Seemed to work for me. I just looked in my code though, and with their
latest release I stopped using my "fixed" version of their code because
I thought they had fixed their version.... can't remember now. I'll
have to check.
-Lee
-----Original Message-----
From: Liming CHEN [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 15, 2001 12:03 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] non-uniform scale interpolation - esp. to the author
of the KBRotPosScaleSplinePathInterpolator CLASS
Dear all,
The core class RotPosScalePathInterpolator does not support non-uniform
interpolation. The RotPosScaleTCBSplinePathInterpolator or
KBRotPosScaleSplinePathInterpolator classes in the Utility pack do not
support
such function too. I have checked the souce code of the above classes.
Here is what
they said:
// TODO: Vijay - Handle Non-Uniform scale
// Currently this interpolator does not handle non uniform
scale
// We cheat by just taking the x scale component
// Scale the transformation matrix
sMat.set((double)iScale.x);
tMat.mul(sMat);
// Set the translation components.
tMat.m03 = iPos.x;
tMat.m13 = iPos.y;
tMat.m23 = iPos.z;
rotation.set(tMat);
My question is if I replace the sMat.set((double)iScale.x) with
rotation.setScale(iScale), (that means that the Transform3D contains a
non-form
information), then the class will support the non-uniform scale
onterpolation. I
doubt if it is so simple.
Could someone or the author of these Util classes give me a clue? Are
there other
options?
Thanks
liming
========================================================================
===
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".
===========================================================================
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".