From: "Tobias Stjernefeldt" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
> Hi,
> The method setAxisOfRotation() of rotationInterpolator
> requires a Transform3D object, ie a 4x4 matrix.
>
> How do you represent an axis with a 4x4 matrix?
By default, the RotationInterpolator causes a rotation around the y-axis of
its target TransformGroup. The Transform3D that you specify in the
constructor or in the set* method is interposed between the target
TransformGroup and the Interpolator. For example, to get the
RotationInterpolator to spin around the local z-axis, you'd use something
like this:
Transform3D setZAxis = new Transform3D();
setZAxis.rotX(Math.PI/2.0); // rotates 90 degrees about the x-axis. This
lines up the
// Interpolator's (spin)
y-axis along the local z-axis.
// construct with:
RotationInterpolator rotator =
RotationInterpolator(rotationAlpha,
objSpin,
setZAxis,
0.0f,
(float)(Math.PI*2.0));
// or use the set* method on an existing RotationInterpolator.
rotator.setAxisofRotation(setZAxis);
As far as I'm concerned, the documentation of this whole thing is all but
encrypted. I spent hours with ColorCube until I figured out how it worked.
I stopped trying for real understanding fairly early, and that helped a lot.
Fred Klingener
Brock Engineering
===========================================================================
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".