Title: RE: [JAVA3D] Rotate around 2 different axis

You have to multiply the two rotations together, and then apply the result.

Quick example for 2 axis of rotation:

                Transform3D xTrans=new Transform3D();
                Transform3D yTrans=new Transform3D();
                Transform3D zTrans=new Transform3D();
                yTrans.rotY(ry);
                zTrans.rotZ(rz);
                xTrans.mul(zTrans);
                xTrans.mul(yTrans);
                xTrans.setTranslation(new Vector3d(tx,ty,tz));
                tempTransformGroup.setTransform(xTrans);

Scott

-----Original Message-----
From: Rodrigo Obando Restrepo [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 26, 2002 3:13 PM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Rotate around 2 different axis


hi.

I want to rotate around two different axis, first a rotation around Y and
then a rotation around X.

My problem is that when i rotate the second time, the first rotation is
cancelled.

Can someone help me?

thanks

_________________________________________________________________
Descargue GRATUITAMENTE MSN Explorer en
http://explorer.yupimsn.com/intl.asp.

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