Please note that the documentation for that version of the
RotationInterpolator constructor states:
axisOfRotation - the transform that defines the local coordinate system
in which this interpolator operates. The rotation is done about the
Y-axis of this local coordinate system.
To clarify, the transform you specify here is used as a coordinate
system transform. By default the RotationInterpolator rotates about
the Y axis of the local coordinate system of the object. Your transform
maps the local Y axis onto the local Z axis (rotate about the X Axis
-Pi/2 radians, actually this makes the rotation operate about the Z axis
in reverse).
Ken Causey
ineffable
At 06:48 PM 6/7/00 +0200, you wrote:
>Hello all. I have a problem with AxisAngle4f class, i don't understand
>how to use it very well, i can make it work as i want but i don't know
>why it works in that way. I am using it to set the axis of rotation of a
>RotationInterpolator. Here is my piece of code:
>
>
>//--------------
>
> AxisAngle4f faxisOfRot = new
>AxisAngle4f(1.0f,0.0f,0.0f,(float)Math.PI/-2.0f);
> Transform3D eje = new Transform3D();
> eje.set(faxisOfRot);
>
> Alpha rotationAlpha = new Alpha(-1, 4000);
>
> RotationInterpolator rotator =
> new RotationInterpolator(rotationAlpha, objSpin, eje,
> 0.0f, (float) Math.PI*2.0f);
>
>//------------------
>
>The scene is just a colorcube.
>
>With this axis my cube is CW rotating arround the z-axis... Why??
>if I set the angle to "(float)Math.PI/2.0f" the cube rotates arround the
>same angle but in CCW.
>and if the angle is 0.0f then the rotation is arround y-axis.
>
>I don't understand how it is working, i can do what i want, for example
>a rotation arround x-axis just trying changing the angle value to find
>out what i want, but i would like to know how it really works. I think
>that you can set an axis just with one vector, What is the angle
>argument for? maybe is a basic geometry question, i don't know, but i
>will be very glad if someone could explain it to me.
>
>Thanks in advance. This is very important for me.
>
>===========================================================================
>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".