This sounds to me like you are not taking into account that the transform
groups have local coord systems and therefore any hierachy will affect the
objects down the chain. Your rotations must be relative to the LOCAL
coordinate system not the WORLD coordinates. This takes a little getting
used to but there are many good reasons for it. Q where is your data comming
from?
-----Original Message-----
From: Discussion list for Java 3D API
[mailto:[EMAIL PROTECTED]]On Behalf Of Liming CHEN
Sent: Wednesday, December 15, 1999 4:10 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] RotationPathInterpolator for Animation
Hello,
I am currently using RotationPathInterpolator to animate virtual human.
I first build each part of the human body e.g. legs, arms etc. and then
use transformgroup(mainly translations) to form a articulated figure.
However, when I use RotationPath Interpolator to animate the motion of
each part of the body. It seems that the rotation centre is changing.
For example, to animate the right arm, I use the following code
// using RotationPathInterpolator to animate the motion of right arm
// right arm translation - raTrans - to form a figure hirarchy
Transform3D raTrans = new Transform3D();
raTrans.set(new Vector3f(-0.16295f, 0.29f, -0.0183f));
// right arm transformgroup
TransformGroup rShoulderTGT = new TransformGroup(raTrans);
rShoulderTGT.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
upperBodyTGTTemp.addChild(rShoulderTGT);
// right arm rotation behavior
rShoulderTGT.addChild( RotPathBehavior(alpha, rShoulderTGT, raTrans,
rShoulderRIBSKnots, rShoulderRIBSQuatfloat) );
rShoulderTGT.addChild(new HumanRUppArm());
The above code does not work correctly. I think the problem is relevant
to the translation and the specification of the axis of the rotation.
Can anybody point out the problems and give the solution?
I am, in particular, not sure how to specify the Transform axisOfRot in
the constructor of RotationPathInterpolater. any idea on how it should
be done?
Yours sincerely
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".