Hi Nicolas,
RotationInterpolator generates a rotation transform about the local Y-axis. If
you want rotate about another axis, you need to change the axisOfRotation in
the constructor.
Suppose you need to rotate about the X-axis, then the Transform3D
"axisOfRotation" should make a rotation to align the Y-axis in the X-axis
direction :
Transform3D axisOfRotation = new Transform3D();
axisOfRotation.rotZ( - Math.PI / 2);
Another solution is to add a transformGroup in the path from the Locale to the
RotationInterpolator to achieve the same rotation:
:
TransformGroup tg = new TransformGroup();
Transform3D trans = new Transform3D();
trans.rotZ( - Math.PI / 2);
tg.setTransform(trans);
tg.addChild(myInterpolator); // in this case you don't need to specify the axis
of rotation in the constructor
:
I hope this helps
Dani.
Nicolas Thiessen wrote:
> Hi, i'm trying to use the RotationInterpolator to rotate a scene, but
> i'm having trouble setting the rotational axis. It doesn't behave the
> way i thought it would. Could some one please explain how i set the
> AxisAngle to rotate around differing axis properly? the documentation
> doesn't say much... to me anyway.
>
> thanks,
> nic
>
> ===========================================================================
> 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".