Hi,
I had a similar problem in understanding this. Well, for this case what I
figured out was that , by default the axis of rotation for an object is
y-axis in Java3D , right! and in this case you want to rotate around the
z-axis, so the meaning I thought was that
(1.0,0.0,0.0,-PI/2) rotate x-axis, around the y-axis(default) by -PI/2
which is CW around y-axis, so that it now coincides with the +ve z-axis.
hmm, well, I am not sure that this is right. Because there are many other
cases when I tried this logic, it didnt seem to work!!
If somebody else knows the explanation please do help me as well !!

Cheers
Tina



> 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".
>

Tina Manoharan
PhD. Heriot Watt University
Ph: 07801 069485 (mobile)
Ph: 0131 449 5111 ext. 4191 (office)
Ph: 0131 449 5111 ext. 4197 (lab)

===========================================================================
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".

Reply via email to